[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 155
  • Last Modified:

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
0
Pete2003
Asked:
Pete2003
  • 3
  • 2
  • 2
  • +1
1 Solution
 
TheAvengerCommented:
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now