Sourcecode displays in browser

Hi All,

I have an C# web app. When we installed it on a pc all it showed was the source code for the ASPX page.

The problem we foud was that the .NET framework was not installed.

My question is what other reasons would there be for just the source code being shown.

Txs
Peter
Pete2003Asked:
Who is Participating?
 
TheAvengerConnect With a Mentor Commented:
It is possible that the ASPX extension is not registered correctly to be handled by IIS with .Net. You can correct such a problem by running:

aspnet_regiis -i

from the command prompt
0
 
TheAvengerCommented:
aspnet_regiis resides in C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 for .Net 1.1
0
 
Pete2003Author Commented:
ok but that will get handeled by reinstalling .NET ...

I'm looking for any other reasons then .NET installation
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
TheAvengerCommented:
This is not exactly so. If you install VS 2005 Beta for example, it will install .Net 2.0 and will register it in the IIS, so you cannot debug with VS 2003. If you then want to use VS 2003 you can skip reinstalling the framework or removing the new one or both and just run this additional line of code. Also if you install .Net framework before IIS and then you install IIS, the framework will be ok but not registered with IIS. So you can again use this line.
0
 
Mohammed NasmanSoftware DeveloperCommented:
also you need to make your application folder as Virual Directory in IIS
0
 
Pete2003Author Commented:
ok will not be using .NET 2.0 or anything with beta to it's name :)
as far as virtual directories go ... if I did't have the IIS set up then I couldn't even get to that directory ... I'm in ... just had issues with NET framework ...

ok but I guess then reinstalling .NET is only solution .. txs guys
0
 
Mohammed NasmanSoftware DeveloperCommented:
>>if I did't have the IIS set up then I couldn't even get to that directory

you can access it, even it's not a virual directory

if you are connecting to remote host, insure you are placing your application in cgi folder, or the one who allow you to use asp.net
0
 
ptmcompCommented:
Sometimes you have to call aspnet_regiis again after adding new virtual directories.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.