p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning ASP.NET 4 : in C# and VB (http://p2p.wrox.com/forumdisplay.php?f=560)
-   -   IIS failure (http://p2p.wrox.com/showthread.php?t=86479)

vbboyd January 27th, 2012 10:35 PM

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'.

vbboyd January 27th, 2012 10:40 PM

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.

Imar January 28th, 2012 03:26 PM

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

vbboyd January 28th, 2012 10:20 PM

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'.

Imar January 29th, 2012 02:55 AM

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

vbboyd January 29th, 2012 12:25 PM

Quote:

Originally Posted by Imar (Post 280833)
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?

Imar January 29th, 2012 01:26 PM

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

vbboyd January 29th, 2012 02:46 PM

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.

Imar January 29th, 2012 03:00 PM

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

vbboyd January 29th, 2012 03:15 PM

The IIS problem
 
Quote:

Originally Posted by Imar (Post 280855)
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?


All times are GMT -4. The time now is 07:49 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.