System.NullReferenceException
Web アプリケーションで例外が発生します。
[NullReferenceException: Object reference not set to an instance of an object.]
Home..ctor() in D:\Hosting\9651310\html\Home.aspx.vb:6
ASP.home_aspx..ctor() in D:\Hosting\9651310\html\Home.aspx.vb:912304
__ASP.FastObjectFactory_app_web_2ocmh1tt.Create_ASP_home_aspx() +47
System.Web.Compilation.BuildResultCompiledType.CreateInstance() +32
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) +109
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31
System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path) +37
System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +334
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184
例外をスローする行は次のとおりです。
Dim con As New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("Connection").ToString())
私の web.config ファイルの接続文字列セクションは次のようになります。
<connectionStrings>
<add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
</connectionStrings>