-3

asp.net page display only html tags When I want to show in my localhost. I have created a asp.net website project in vs 2010. And move the Published files to C:\wamp\www\CRS for localhost. But asp.net page display only html tags. see the Image.

This is a website project not web application. So I can't Build the package and Import to IIS. Pls help me.

enter image description here

Edit 1-

When I move All files to C:\inetpub\wwwroot\crs and access in localhost,.. It gives Configuration Error.

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

What I miss?

2
  • 1
    Deploy that site on IIS using VS2010 Publish web site option. That should work.
    – Nilesh
    Nov 12, 2013 at 5:17
  • @Nilesh I have right click the project in solution explorer and runed Publish Web Site. Is any other Deploy method is there.
    – Sagotharan
    Nov 12, 2013 at 5:24

3 Answers 3

0

You should use IIS to run ASP.net.

It seems you are using Apache. If you REALLY want to use Apache you need to install mono : run asp.net on apache

Otherwise setup a new website in IIS and point to your directory.

1
  • 1
    I have Installed IIS and Apache. So how can I run my website in ASP.net. Am I want to move the files to innetpub?
    – Sagotharan
    Nov 12, 2013 at 5:17
0

as @basarat give a way to solve this question.

1) Copy and paste the Published website files in C:\inetpub\wwwroot

2) In IIS right Cilck the Default website and Add Application property. It opens the Add Application window.

3) Give the name in Alias Field, then Give a Correct path of project.

enter image description here

4) Then you can access the asp.net page in localhost

-1

check the content type that the page is served with it has to be "text/html" instead of what you have

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.