Link to home
Start Free TrialLog in
Avatar of tcpfreak
tcpfreak

asked on

VS 2005 upgrade woes - how to update web site?

I need a link to an article that will answer the following bone-headed question in a very dumbed-down-HOWTO kind of way:  I need a dumbed down "How to move your Visual Studio 2005 web projects from your test server to your production server" article.  This has got to be an article specific to VS 2005 and it's got to be written for a complete moron.  

Back in the world of Visual Studio 2002, I would create a web page, edit the code-behind page, and compile it.  Then, I would copy the aspx page to the right directory on the production server and copy the DLL to the BIN directory.  That was very simple.

The other day, I "upgraded" the test server to VS 2005.  Not only did that delete the web site DLLs on my test server,  it doesn't create new ones when I compile the project.  I've done enough research to understand that VS 2005 doesn't create the DLLs and it *somehow* uses the files in the App_Code directory but for the life of me, I can't figure out how to publish the modified pages to the production server.  

The pages work great on my test server but when I copy them to the production server, I get errors like:

"Could not load type Could not load type 'Namespace.PageName'."
The following web page does not answer my question:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q306155
The reason it doesn't help is that the Global.asax.cs file doesn't get updated when I update the .aspx/.cs pages and then build the solution.

Thanks for your help.  I'm sure I'm just missing one small but key step...

Avatar of levyuk
levyuk

Are you sure that the production server has .net 2 installed on it, I would check that first. As for publishing them, I just FTP the files to the server. Works fine.
Avatar of tcpfreak

ASKER

levyuk  -
I didn't have .net 2 installed, so I downloaded and installed it from MS.  Thanks for the tip.  I now get the following error:
Parser Error Message: Could not load the assembly 'App_Web_ltyq7qeu'. Make sure that it is compiled before accessing the page.
'App_Web_ltyq7qeu' is the name of one of the DLLs that's in the BIN directory.

Also, I get this footer on the error:
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032

Seems like it should say .NET Framework Version:2.0 - so I'm a little mystified on that one.
Go to IIS and find your project folder. Under ASP.NET tab you can select what framework to use. It looks like its using 1.1, like you mentioned here. Also, rebooting your system after installing NET Framework 2.0 and resetting your IIS is recommended.

If all this doesn't help...try opening this project from your computer...so when you compile it, it will be directly compiled on the server. Second thing is to try to change in aspx pages 'CodeBehind' to 'Src'(you will need to remove Inherit part too).

Good luck!
In case you cant see ASP.NET tab you'll need this tool:
http://www.denisbauer.com/NETTools/ASPNETVersionSwitcher.aspx
This is odd and interesting.  I found the ASP.NET tab (thanks, guys) and changed the web site to use framework 2.0.  I now get the following error:

"Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable.  Please hit the "Refresh" button in your web browser to retry your request.

Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur. "

The error is:
"Failed to execute the request because the ASP.NET process identity does not have read permissions to the global assembly cache. Error: 0x80131902  "

FWIW, I rebooted a couple times already.  Thanks again for your help!!
I assume that the error message is referring to either the App_global.asax.compiled or App_global.asax.dll files in the BIN directory (?).
It's probably also worth mentioning that the ASPNET user has MODIFY permissions on wwwroot and all child folders.
try this:

1. Open a command prompt
2. Stop IIS: iisreset /stop
3. Change to the .NET Framework 2.0 root directory: C:\WIndows\Microsoft.Net\Framework\v2.0.50727\
4. Reinstall ASP.NET 2.0 by using the following command: aspnet_regiis -i command.
5. Start IIS again after it has been run: iisreset /start
6. Try to access your web pages
Try creating a brand new test site and seeing if it runs. It might have something to do with upgrading. I know it should work but I've found that they don't always do what they should :)
Any luck?
aki4u - No, that didn't do it.  I'm still getting the following error:
"Failed to execute the request because the ASP.NET process identity does not have read permissions to the global assembly cache. Error: 0x80131902  "

I'm going to check out the suggestions on this page:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=135969&SiteID=1
and trying the suggestion that's different than the one you proposed.  

I appreciate your suggestions.  Please keep them coming!


levyuk - the test site actually works great.  It's the production site that's being a pain.  
ASKER CERTIFIED SOLUTION
Avatar of aki4u
aki4u

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This was it:
Method 3: Enable IIS to run with the default user account (i.e., ASPNET)
1. By default, IIS uses the ASPNET user account to run applications. Sometimes, this still
needs some further configuration.
2. Open the machine.config file from the configuration folder of the intended .Net
Framework (e.g., C:\WINNT\Microsoft.NET\Framework\v2.0.50727\CONFIG). Search
for the following line:
<processModel autoConfig="true"/>
Change it to the following:
<processModel userName="system" password="AutoGenerate" />
3. Restart IIS.
a. Start | Control Panel | Administrative Tools | Internet Services Manager
b. Right-click on the machine name and select Restart IIS

Daaaang!  Thanks for your persistence!!!!
Glad to help.