Sign in to follow this  
CosmoKramer

[.net] Using IIS with ASP.NET

Recommended Posts

Hi, Im trying to get ASP working at home, and I am having the hardest time doing so. I have seen tons of help forums on the web, but none of their solutions seem to work. I think the problem lies within my IIS. I have uninstalled and reinstalled the program many times, same with my Visual Studio .NET (which takes forever!) When I right click on web pages inside IIS and try to go to their properties, no window is displayed, including no error message. When I try to create a new ASP Web Service, or when I try to open an existing one, I get the infamous HTTP 500 Server Error. I changed IE to not show friendly http errors, but since the error comes up within .NET then It doesnt seem to change anything or give any more detail? When I open one of my .aspx files with IE it doesnt give me an error, it shows the static content. If I am doing it correctly, it seems that the Error logs are empty?? And the Event log just gives attempts to restart or reinstall or register the program. I am completly new to this, but I really need to get my homework done, so if anyone could help me, I would really appreciate it! Thanks! PS. I wasnt sure if this was the correct place to post this. PPS. If it helps, I tried disabling my McAfee virus software and got the same error message in .NET

Share this post


Link to post
Share on other sites
(Previously CosmoKramer - Registered for my own account)

Hey, Thanks for the Info

I have run the command: using the .NET command prompt and Im still having these problems.

I cant create a new ASP Web Service (under VB) because I receive the same error as soon as I try to create a new project:

"The web server reported the following error when attempting to create or open the Web Project located at the following URL: "http://localhost/tgAss04'. 'HTTP/1.0 500 Server Error' "

A sidenote: I do have a wireless network running, so I thought it might be possible that I need to change some settings?

I have all my files in the wwwroot folder under C:/Inetpub
I have placed both a network share and a web share on my wwwroot folder, tgAss04 project folder, and the mailroot folder. Under the web share properties I chose read/write/DirectoryBrowse as the acces permissions and chose 'execute (includes scripts)'

But seeing how I cant create a new project, I dont think it is a problem with my actual project, and maybe a problem with IIS instead.

Thanks for the help guys!
Im getting really frustrated by this!

Share this post


Link to post
Share on other sites
What version of IIS,VS and os are you using.

Is the ASP System installed and linked in properly...

For a Quick one. even if you think that the install is correct run the ASPnet_RegIIS.exe from the .net framwork directory on the Web server machine.

<<C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe>>

This command will re register the aspnet system on the machine. Assuming u are using the .net framwork 1.1, if you are using another version the exec is located in different version folders.

Share this post


Link to post
Share on other sites
It sounds as if you don't have IIS set up for parsing the .aspx file extension, hence it dumping the static page. You will need to register the document with the IIS application (ISAPI) configuration to make it work.



You'll need to register all ASP.NET types (.cs, .aspx, .resx, .asax, etc) to C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll or whatever your framework directory path is. I believe this is what the aspnet_regiis.exe application does.

Share this post


Link to post
Share on other sites
Have u set read permission for the web folder?
Have u previously run IIS Lock Down tool and prevent all access keywords? If yes, rerun IIS Lock Down and change the settings.
Since the error you get is 500, it may be caused by wrong settings in your Directory Security. Try to goto IIS management snap-in. Right click your default web site, select properties and check the settings in the Directory Security tab. For testing purpose, u could set it to allow anonymous access and see.
There are so many reasons that could cause this problem. If all these don't work, you'll need to provide more information before we could help.

Share this post


Link to post
Share on other sites
realJJ, because Tasha-Luigi said the following:

Quote:
When I open one of my .aspx files with IE it doesnt give me an error, it shows the static content.


I am fairly certain that the .NET framework needs to be registered to IIS again. Another good way to verify this is to open the properties for the Default Web Site in IIS and then click on the Application Configuration button, if your Configuration does not look like evolutional's screenshot above, with the .aspx, .asax, and other .___x files pointing to the executable path of the .NET framework, then it definitely needs to be re-registered.

Tasha-Luigi, you do need to have the -I when running the aspnet_regiis.exe from the command prompt, this is necessary in order to install it correctly.

That should take care of the issue, although you may also need to re-register the aspnet_isapi.dll as well. You can do that by clicking Start, Run... and entering the following in the text box:

regsvr32 %windir% \Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll

Again, the v1.1.4322 should be changed to the correct version number, I am assuming you are using .NET Framework 1.1.

After doing this, open the run dialog again and type "iisreset" without the quotes and hit enter. Then close all of your IE windows, do the hokey pokey and turn yourself around, and try the page again. :-D

Here are some links that talk about issues with the .NET framework not linking to IIS correctly:

http://support.microsoft.com/default.aspx?scid=kb;en-us;841558

http://support.microsoft.com/kb/306005

http://support.microsoft.com/kb/325093/EN-US/

Share this post


Link to post
Share on other sites
Quote:
Original post by jedifreeman
realJJ, because Tasha-Luigi said the following:

Quote:
When I open one of my .aspx files with IE it doesnt give me an error, it shows the static content.


Hey jedifreeman, good catch there :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this