Last post Dec 18, 2015 07:29 PM by PatriceSc
Dec 18, 2015 05:45 PM|TGordon|LINK
I have recently inherited an asp.net vb web application. It currently runs from a windows 2003 server, which we are in the process of replacing. I need to demonstrate the site operating on the new Dev server before we deploy to the new web host. When
I run the site from VS it works just fine. Then I publish to the the dev server's iis (same machine) and the page is mostly blank.
The code behind is not being run. Most of the content for the page is being generated in the code behind (pulling content from the database) and I found that if I comment out the content of the Page_Load event I get the same results when debugging.
The closest I've found in research says to change from codebehind to codefile, but that just creates a larger error, and it wants the individual aspx.vb files to be deployed. I want to be able to run the site just as it was run before. Are there any suggestions
as to why this might be happening?
Dec 18, 2015 05:55 PM|PatriceSc|LINK
"mostly" blank or "entirely" blank? Have you tried to look at the Windows log to see if you have a message? Are exception handled properly ? My first thought would be that some settings in the web.config (such as the db server connection string) is not valid
for this new server.
Or it could be that the new db (or do you connect to the same data?) doesn't have any data and so doesn't have anything to show resulting in a page which is "mostly" blank.
As I like to tell often, it is usually much easier to take the time to see what happens exactly (ie what is the exact behavior or to find some actual error message) to then understand why this PARTICULAR problem happens rather than to just see that something "doesn't
work" and then wondering why (you have much more possible causes as you don't even know what is the problem).
Dec 18, 2015 06:41 PM|TGordon|LINK
Mostly blank. The Master page formatting is being displayed, but the content that would be pulled from the database is not there.
I had checked the connection string before, multiple times, but on your suggestion I checked it again and noticed that I was using Trusted_Connection=true. This, of course, works for debugging. I changed it to the web db user and that solved it. Thanks
for asking me to check my p's and q's again, apparently that's what I needed.
Dec 18, 2015 07:29 PM|PatriceSc|LINK
Great to see this is solved. You should have an error message such as "login failed for user
'IIS APPPOOL\DefaultAppPool'" in the event log. It allows then to see that the issue is that the account under which the IIS app is running is used but not allowed to access the db (and so not using integrated security is a way to solve