当前位置:编程学习 > C#/ASP.NET >>

.net 访问出错 希望高手协助搞定一下

WWW.XXX.COM/GenericErrorPage.htm?aspxerrorpath=/usercenter/main.aspx


.net 访问出错  希望高手协助搞定一下

空间已经配置完毕 数据库已经调试好 所有权限配置完毕就是访问不了

真实地址是 www.XXX.COM/usercenter/main.aspx

一访问就出错到   WWW.XXX.COM/GenericErrorPage.htm?aspxerrorpath=/usercenter/main.aspx --------------------编程问答-------------------- main.aspx 页面,出现了exception。
请在web.config里,将customerror 节点的mode设为 Off,然后再访问main.aspx,以确定出现的exception。 --------------------编程问答-------------------- xrascal  楼上QQ多少 我把问题发给你一下还是依然没搞定 --------------------编程问答-------------------- 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.Data.SqlClient.SqlException: 无法打开登录所请求的数据库 "sql51zhaoshangwang"。登录失败。
用户 'shujuku111' 登录失败。

Source Error: 


Line 3438:        st_webconfig webconfig = new st_webconfig();
Line 3439:        if (connstr.State == ConnectionState.Closed)
Line 3440:            connstr.Open();
Line 3441:        SqlCommand CMD = new SqlCommand("select top 1 * from sh_config", connstr);
Line 3442:        SqlDataReader RD = CMD.ExecuteReader();

Source File: d:\clientweb\web10000\wwwroot\App_Code\class_eims.cs    Line: 3440 

Stack Trace: 


[SqlException (0x80131904): 无法打开登录所请求的数据库 "sql51zhaoshangwang"。登录失败。
用户 '51zhaoshangwang' 登录失败。]
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5050218
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2275
   System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +35
   System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject) +183
   System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout) +239
   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +195
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +232
   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185
   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +33
   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +524
   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +479
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +108
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +126
   System.Data.SqlClient.SqlConnection.Open() +125
   class_eims.getwebconfig() in d:\clientweb\web10000\wwwroot\App_Code\class_eims.cs:3440
   class_eims..ctor() in d:\clientweb\web10000\wwwroot\App_Code\class_eims.cs:205
   usercenter_main..ctor() in d:\clientweb\web10000\wwwroot\usercenter\main.aspx.cs:16
   ASP.usercenter_main_aspx..ctor() in c:\windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\32153fdb\84bee343\App_Web_rd3bzsdg.2.cs:0

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) +98
   System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) +241
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +69
   System.Web.UI.PageParser.GetCompiledPageInstance(VirtualPath virtualPath, String inputFile, HttpContext context) +226
   System.Web.UI.PageParser.GetCompiledPageInstance(String virtualPath, String inputFile, HttpContext context) +129
   URLRewriter.RewriterFactoryHandler.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) +723
   System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +203
   System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +128
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184 --------------------编程问答-------------------- 上面是安装二楼修改后出错 的文件 可以访问 但是出错 是数据库问题?
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,