Server Error in '/' Application.
--------------------------------------------------------------------------------Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
System.Web.UI.WebControls.PagedDataSource.GetEnumerator() +166
System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +343
System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +53
System.Web.UI.WebControls.Repeater.DataBind() +72
Default2.Databind() +300
Default2.Page_Load(Object sender, EventArgs e) +71
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436
--------------------------------------------------------------------------------Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
System.Web.UI.WebControls.PagedDataSource.GetEnumerator() +166
System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +343
System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +53
System.Web.UI.WebControls.Repeater.DataBind() +72
Default2.Databind() +300
Default2.Page_Load(Object sender, EventArgs e) +71
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436
解决方案 »
- Ext.net 1.0 TreePanel控件 如何获取点击的子节点的NodeId,Text值
- 如何另弹出一个窗口
- 关于FreeTextBox的背景颜色改变的问题,请教各位大大!!!!!!!!!!
- 做企业应用 用asp.net mvc好还是asp.net webForm好?
- 高分求助 Asp.net项目之间如何传递参数
- 点击图片切换层
- 真的是没有分了:下跪了问“大家知道如何将下载的动网论坛中发表贴子的那个多功能编辑器如何做为一控件应用在asp.net中吗?(就像FreeTex
- 请问如何在get参数中输入汉字
- 为什么vs.net2002中文版下编的页面在vs.net2003中文版下显示就不正常啊???
- 请教关于asp.net页面上获取所有控件的问题?
- 乱码问题
- asp.net读取word文档
检查下数据库连接方式,数据库权限,IIS权限,设置,还有程序里的连接字符串~
哪位大侠给小弟详细讲述一下网站发布在IIs上,以及发布到互联网上的步骤,asp.net2.0程序和sqlserver2005怎么弄~
谢谢,可以加分~跪求!
<!--
注意: 除了手动编辑此文件以外,您还可以使用
Web 管理工具来配置应用程序的设置。可以使用 Visual Studio 中的
“网站”->“Asp.Net 配置”选项。
设置和注释的完整列表在
machine.config.comments 中,该文件通常位于
\Windows\Microsoft.Net\Framework\v2.x\Config 中
-->
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<appSettings/>
<connectionStrings>
<!--<add name="STInfo" connectionString="server=192.168.1.101;uid=;pwd=;database=STInfo"/>-->
<!--<add name="STInfo" connectionString="Server=192.168.1.101\SQLEXPRESS;Initial Catalog=STInfo;User ID=admin;Password=admin123456"/>-->
<add name="STInfo" connectionString="Persist Security Info=True;User ID=admin;Password=admin123456; Initial Catalog=STInfo ; Data Source=192.168.1.101; Connect Timeout=30"/>
</connectionStrings>
<system.web>
<!--
通过 <authentication> 节可以配置 ASP.NET 使用的
安全身份验证模式,
以标识传入的用户。
-->
<authentication mode="Forms">
<forms name="Login" loginUrl="~/Admin/Login.aspx" timeout="60" />
</authentication>
<!--
设置 compilation debug="true" 将调试符号插入
已编译的页面中。但由于这会
影响性能,因此只在开发过程中将此值
设置为 true。
-->
<compilation debug="true">
<assemblies>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
</assemblies>
</compilation> <httpRuntime
enable="true"
executionTimeout="90"
maxRequestLength="4096" />
<!--
如果在执行请求的过程中出现未处理的错误,
则通过 <customErrors> 节可以配置相应的处理步骤。具体说来,
开发人员通过该节可以配置
要显示的 html 错误页
以代替错误堆栈跟踪。 <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<customErrors defaultRedirect="~/ErrorPage.htm" mode="RemoteOnly">
<error statusCode="404" redirect="FileNotFound.htm"/>
</customErrors>
</system.web>
</configuration>---------------------------------------------------------------
上面是我的web.config
如果SQL Server为混合验证模式的话建议不写密码和账号~
<add name="STInfo" connectionString="Data Source=.\sqlexpress; Persist Security Info=True;Initial Catalog=STInfo ;User ID=admin;Password=admin123456; Connect Timeout=30"/>
我估计应该可以~我的网站发布了!就是访问不到数据~本地运行一切OK!
---------------------------------------------------------
兄弟,我在vs中和在发布在本地的网站上试了都可以运行,能访问数据的!
就是用你的字符串的~
但是网上发不好的应该也是不行的~
我仅仅给老板了一个发布的网站,数据库怎么办?
http://blog.csdn.net/wlc_win/archive/2008/12/24/3593519.aspx
你说的真对~我们老板真的什么都不懂的~我给他说说~
会给分的~
asp.net(c#)技术群招募成员 有意者请速加群:50961072
兄弟,你那儿有asp.net程序从运行到本地发布以及互联网发布的过程或者步骤吗?
我新手~不懂的发布网站的~我这个网站都是用vs2005发布网站,然后把发不好的网站拷贝到Internet信息服务下的也不懂
然后在网站下建立一个虚拟目录,程序就在本地运行了~
跪求,请多多指教,多学习学习!