Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 24th, 2010, 04:35 PM
Authorized User
 
Join Date: Oct 2009
Posts: 19
Thanks: 3
Thanked 0 Times in 0 Posts
Send a message via ICQ to nkvd3941 Send a message via AIM to nkvd3941 Send a message via MSN to nkvd3941
Default

Sorry - a bit confused here

I have attached the ASPNETDB to my sql2005, and created a connection string for the db, by creating a gridview of one of the tables in a dummy webpage.

Where do i use the new connectionstring, ie how do i point to the login.mdf from my application?

Bearing in mind, the existing connectionstring is
Data Source=.\SQLEXPRESS;AttachDbFilename=D:\E_Folders\ OddsAndSods\csharp.web\Recipes\App_Data\ASPNETDB.M DF;Integrated Security=True;User Instance=True, i.e. a sql2005 connection.
 
Old January 24th, 2010, 04:40 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Did you read the article I linked to in the article I linked to? ;-)

In case you haven't: http://weblogs.asp.net/scottgu/archi...25/423703.aspx

Also, check out Chapter 18 and Appendix B. The scenario you're describing is fuilly documented there...

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
nkvd3941 (January 31st, 2010)
 
Old January 31st, 2010, 05:25 AM
Authorized User
 
Join Date: Oct 2009
Posts: 19
Thanks: 3
Thanked 0 Times in 0 Posts
Send a message via ICQ to nkvd3941 Send a message via AIM to nkvd3941 Send a message via MSN to nkvd3941
Red face Success

WOHOO!

Got it all to work. The key was the permissions in your article and creating my own securitydb using the scott guthrie article that you pointed me too.
Took me a while to get there but i now know a lot more about sql security than i did about 3 weeks ago.

Many thanks for all your help Imar.

Last edited by nkvd3941; January 31st, 2010 at 09:50 AM..
 
Old January 31st, 2010, 05:33 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Excellent. Glad it's all working now....

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old March 13th, 2010, 10:17 AM
Authorized User
 
Join Date: Oct 2009
Posts: 19
Thanks: 3
Thanked 0 Times in 0 Posts
Send a message via ICQ to nkvd3941 Send a message via AIM to nkvd3941 Send a message via MSN to nkvd3941
Default

Hi - me again

Paid for some hosted webspace, got my 2 databases uploaded, put my Published webdie in the wappropriate place, type in the appropriate domain address (dctsystems.org), and keep getting teh following message:

"Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS."

Can anybody help?
 
Old March 13th, 2010, 10:26 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Take a look at the actual address and the error message:

http://dctsystems.org/ReleaseHosted/RecipesMain.aspx

Basically, your application runs in the folder ReleaseHosted; not in the root of the server. Therefore, the config file at /ReleaseHosted/web.config tries to override settings defined for the root (/) which is not allowed. Two options to fix it:

1. Move your files to the root so you can access them like this:
http://dctsystems.org/RecipesMain.aspx

2. Make ReleaseHosted a virtual directory. Your host knows how to do this, and they should do it for you.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
nkvd3941 (March 14th, 2010)
 
Old March 14th, 2010, 04:16 AM
Authorized User
 
Join Date: Oct 2009
Posts: 19
Thanks: 3
Thanked 0 Times in 0 Posts
Send a message via ICQ to nkvd3941 Send a message via AIM to nkvd3941 Send a message via MSN to nkvd3941
Default

Once again Imar, thanks for your help. I went for the first option.

The web-site now works on a hosted site, so from knowing absolutely nothing about web-programming, thanks to your book and help i have written a small hosted site using databases / security / css etc.
I feel i can now go from here and offer real business aplplications.

I cant thank you enough.
 
Old March 14th, 2010, 05:17 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You're welcome. Glad it's all working now, and good to hear the book has been so useful to you.

Good luck with your future projects.

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old March 28th, 2010, 12:34 PM
Authorized User
 
Join Date: Oct 2009
Posts: 19
Thanks: 3
Thanked 0 Times in 0 Posts
Send a message via ICQ to nkvd3941 Send a message via AIM to nkvd3941 Send a message via MSN to nkvd3941
Default

Still getting nowhere with the Virtual directory.

I asked support to create one, but that didnt seem to work.

So i created my own off the Plesk website they give users to manage their websites.

I created a virtual / physical folder called RecipesHostedI, put all my stuff in their (thats already on the root), so the entire path is:

http://dctsystems.org/RecipesHostedI/

The link on the first page takes me to my RecipesMain.aspx, but thats when i just get a server error.

Am i missing the point here?
 
Old March 28th, 2010, 01:46 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

That's impossible to say without seeing the real error. Internal Server Error could be anything.... ;-(

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy One Row from Gridview to Gridview lvprasad2007 ASP.NET 2.0 Professional 0 July 28th, 2009 08:29 AM
GridView pady123 ASP.NET 2.0 Professional 0 November 13th, 2008 05:48 AM
Get GridView Cell Value Based on GridView Column stublair C# 2008 aka C# 3.0 0 September 4th, 2008 08:30 AM
Gridview Thinlizzy ASP.NET 2.0 Basics 2 July 20th, 2007 08:33 AM
GridView Sheraz Khan ASP.NET 2.0 Basics 1 July 19th, 2007 10:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.