Click here to Skip to main content
15,912,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am completing a project in asp.net with c# with sql server as database.

I want to upload it into remote server, so I uploaded it in web server and named my Home page as Default.aspx.
However, when I browse the Url (http://www.mycompanyname.co.in) it gives an error.


500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.


I can't make out whats wrong in my project. Its works fine in IIS local server.

By the way when a run a html page as default.html it works fine..

Now what should i make to run my .aspx files

Thanking u
Posted
Updated 9-Nov-10 21:40pm
v2
Comments
Dalek Dave 10-Nov-10 3:40am    
Edited for Readability.

Just to make sure, the remote server is an IIS server and not a Linux Apache server, otherwise you have bigger problems.

What happens if you enter "http://www.mycompanyname.co.in/default.aspx", does it display? If it does then the problem is that default.aspx isn't set as a default document in the remote IIS server.

** Update **
Well it looks like it is a problem with server, as you have mentioned that it will return a plain html page but it returns a 500 error for an aspx page your hosting provider will have to fix this issue.

I'm not sure how this server is configured as it gives a 500 error even when it should give a 404 error.

Talk to the hosting provider.
 
Share this answer
 
v2
on entering the "http://www.mycompanyname.co.in/default.aspx"
I got the same error message as i have mentioned above.

500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed.

Is there any correction should be made in web.config file?
 
Share this answer
 
Comments
Rod Kemp 10-Nov-10 3:49am    
Don't add a new answer as a response, click on the Add Comment link under the answer you want to respond to. This way the person who provided the answer will be notified.

What is the actual URL, so I can check. Add your response to my original answer.
Your hosting company will have admin pages or control panel that allow you to define the startup page. Ask them they will make it for you.
 
Share this answer
 
Comments
Rod Kemp 10-Nov-10 5:23am    
It is not a default document problem, even if the page to display is specifically mentioned like "http://www.techniche.co.in/default.aspx" it still displays a 500 error. Hell you can put any page name into the URL and it will give a 500 error even when it should give a 404.
please add below mentioned code in your web.confilg file. it will create startup page run order for your application.

<system.webServer>
<defaultDocument>
      <files>
        <clear/>
        <add value="Default.aspx"/>
        <add value="login.aspx"/>
        <add value="Default.htm"/>
        <add value="Default.asp"/>
        <add value="index.htm"/>
        <add value="index.html"/>
        <add value="iisstart.htm"/>
      </files>
    </defaultDocument>
</system.webServer
 
Share this answer
 
Comments
Rod Kemp 10-Nov-10 5:19am    
It is not a default document problem, even if the page to display is specifically mentioned like "http://www.techniche.co.in/default.aspx" it still displays a 500 error.
uttam bhadra 10-Nov-10 6:47am    
I add the following code in the web.configfile but still have the problem..and get the same error..
I got the solution of the above problem. I faced the previous problem as i did the project in asp.net 3.5 where as my server support by default asp.net 4.0. I just changed the asp.net 4.0 to 2.0/3.0/3.5 mode and the problem is solved..


thanks all 4 ur usefull suggestion
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900