 |
BOOK: Beginning ASP.NET 4 : in C# and VB
 | This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB 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
|
|
|
|

January 27th, 2012, 10:35 PM
|
Friend of Wrox
|
|
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
|
|
IIS failure
When I tried to run your web app as a virtual directory under IIS I get the following error code message:
Cannot open database "PlanetWrox" requested by the login. The login failed.
Login failed for user 'IIS APPPOOL\ASP.NET v4.0'.
|

January 27th, 2012, 10:40 PM
|
Friend of Wrox
|
|
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
|
|
I forgot to mention
I forgot to mention, that the application runs fine when I run it in Cassini, but as soon as you deploy to IIS as part of virtual directory, and try to run it that way it throws an permissions error.
|

January 28th, 2012, 03:26 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
It's a permissions issue. The account used by the web server is not allowed to access the database. Check out Chapter 19 and Appendix for more details.
Cheers,
Imar
|

January 28th, 2012, 10:20 PM
|
Friend of Wrox
|
|
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
|
|
I followed all the directions in your book on pages 718 thru 722 and I got the following error when I tried to browse this website:
Cannot open database "PlanetWrox" requested by the login. The login failed.
Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
|

January 29th, 2012, 02:55 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Those steps deals with the file system, right? You error suggest a database error. The account used by the webserver is not allowed to access the database. Did you check out Appendix B?
If you did and it still doesnt't work I need more information such as the version of Windows and SQL Server you're using, how you set up the site in IIS, how you configured the database and so on.
Imar
|

January 29th, 2012, 12:25 PM
|
Friend of Wrox
|
|
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
|
|
Quote:
Originally Posted by Imar
Those steps deals with the file system, right? You error suggest a database error. The account used by the webserver is not allowed to access the database. Did you check out Appendix B?
If you did and it still doesnt't work I need more information such as the version of Windows and SQL Server you're using, how you set up the site in IIS, how you configured the database and so on.
Imar
|
Are you talking specifically about the steps that you outlined in your book in Appendix B starting on page 768? Just to point me in the right direction are those the steps in need to follow?
|

January 29th, 2012, 01:26 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Yes, that's what I was referring to. The appendix shows you how security in SQL Server works, and then shows you how to attach and configure your database and then use it from a web application running under IIS.
Cheers,
Imar
|

January 29th, 2012, 02:46 PM
|
Friend of Wrox
|
|
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
|
|
Okay I will do that
I will follow those instructions. I just don't know if doing some of the things that are in the examples in chapter 19 of the book will have messed up my IIS settings or not. Thanks for the info.
|

January 29th, 2012, 03:00 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
The error you're getting can be fixed with the proper configuration as explained in Appendix B. And if not, you can always start over with Chapter 19 ... :-)
Imar
|

January 29th, 2012, 03:15 PM
|
Friend of Wrox
|
|
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
|
|
The IIS problem
Quote:
Originally Posted by Imar
The error you're getting can be fixed with the proper configuration as explained in Appendix B. And if not, you can always start over with Chapter 19 ... :-)
Imar
|
The problem is that the databases are sitting on SQL Express and not full blow SQL Server. Do you configure SQL Express the same way you configure SQL Server?
|
|
 |
|