在运行.ASPX页面时,它会显示源代码而不是我的页面。 [英] While running .ASPX pages its shows the source code instead of my page.

查看:80
本文介绍了在运行.ASPX页面时,它会显示源代码而不是我的页面。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已发布该页面并尝试通过localhost访问。它的工作正常。但是,如果我试图在全球范围内访问它显示源代码。



这是URLhttp://59.92.111.69:8080/asp/index.aspx 。



我的页面显示如下。





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.


<%@ 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>





我尝试过:



它在本地主机上工作正常。但如果我从服务器全局访问,则无法正常工作。我正确配置了IIS。请帮我纠正这个。谢谢..



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..

推荐答案

ConnectionStrings:rtsdataConnectionString3 %> SelectCommand = SELECT * FROM [rts_data] > < / asp:SqlDataSource >

< / div >
< / form >
< / body >
< / html < span class =code-keyword>>
ConnectionStrings:rtsdataConnectionString3 %>" SelectCommand="SELECT * FROM [rts_data]"></asp:SqlDataSource> </div> </form> </body> </html>





我的尝试:



它在本地主机上工作正常。但如果我从服务器全局访问,则无法正常工作。我正确配置了IIS。请帮我纠正这个。谢谢..



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..


这是一个由Apache托管的PHP服务器,它无法运行asp.net网站,需要Microsoft ASP.net托管。
That's a PHP server hosted by Apache, it can't run an asp.net site, your need Microsoft ASP.net hosting.


Windows托管或Linux托管?
Windows hosting or Linux hosting ?


这篇关于在运行.ASPX页面时,它会显示源代码而不是我的页面。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆