Click here to Skip to main content
15,916,846 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have published the page and tried to access through localhost. Its working fine. But if i tried to access it globally its showing the source code.

Here's the URL "http://59.92.111.69:8080/asp/index.aspx".

My page displayes like this.


ASP.NET
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="rtslivedata.index" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        
    <div>
    
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
            <Columns>
                <asp:BoundField DataField="a" HeaderText="a" SortExpression="a" />
                <asp:BoundField DataField="b" HeaderText="b" SortExpression="b" />
                <asp:BoundField DataField="c" HeaderText="c" SortExpression="c" />
                <asp:BoundField DataField="d" HeaderText="d" SortExpression="d" />
                <asp:BoundField DataField="e" HeaderText="e" SortExpression="e" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:rtsdataConnectionString3 %>" SelectCommand="SELECT * FROM [rts_data]"></asp:SqlDataSource>
    
    </div>
    </form>
</body>
</html>


What I have tried:

Its working fine on the local host. But not working if i access globally from the server. I configured the IIS properly. Please help me to rectify this. Thank you..
Posted
Updated 21-Apr-16 23:08pm

That's a PHP server hosted by Apache, it can't run an asp.net site, your need Microsoft ASP.net hosting.
 
Share this answer
 
Comments
S.Soundar 22-Apr-16 5:22am    
is there anyother way to run this in the same server?
F-ES Sitecore 22-Apr-16 5:47am    
Your only hope is maybe a product called "mono" that lets you run .net on Apache, but the best solution is definitely to use Windows IIS hosting.
S.Soundar 22-Apr-16 8:08am    
Mono is only for cross platform applications right? please suggest me a better way to host sir. And also suggest me which site is better to host.
F-ES Sitecore 22-Apr-16 8:40am    
Just choose a host of your choice that does Windows hosting, there are loads.
Windows hosting or Linux hosting ?
 
Share this answer
 
Comments
S.Soundar 22-Apr-16 5:22am    
Windows hosting Thiyagu sir.
rkthiyagarajan 22-Apr-16 5:28am    
I think Webconfig issue , So refer this for this link http://www.iis.net/learn/web-hosting/web-server-for-shared-hosting/aspnet-20-35-shared-hosting-configuration

and as well refer hosting guideline for Asp.net

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