开发者

How has my stack trace got file system references to the build machine?

开发者 https://www.devze.com 2023-02-14 02:45 出处:网络
I use svn and asp.net. We have a website and there is an error in it. Im not really concerned about the error I know how to fix it what im wondering is how .net is showing the original file path that

I use svn and asp.net. We have a website and there is an error in it. Im not really concerned about the error I know how to fix it what im wondering is how .net is showing the original file path that the .cs files were in when the prioject was built:

[SecurityException: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
   System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
   System.Security.PermissionSet.Demand() +76
   System.Data.Common.DbConnectionOptions.DemandPermission() +79
   System.Data.ProviderBase.DbConnectio开发者_运维技巧nClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +6265031
   System.Data.SqlClient.SqlConnection.Open() +258
   VLSCore2.VlsDb.GetDataReader(SqlCommand Command) in C:\Repositories\VideoLibraryServer\tags\205_main_hml\VLSCore2\VlsDb.cs:55
   VLSCore2.VlsSettings.GetGeneralSettings() in C:\Repositories\VideoLibraryServer\tags\205_main_hml\VLSCore2\VlsSettings.cs:338
   ASP.global_asax.Application_Start(Object sender, EventArgs e) +136

I mean this is a pre-compiled asp.net application so why are the references in it?


As Jeremiah said, when you have debug symbols (*.pdb) included with your binaries (*.dll), it will use the symbols to resolve the location of the error - that includes the line number and the location of the source file when built.

If you do not want these locations rendered, remove the *.pdb files from the release.


The ASP.net compiler is probably embedding the names of the original files into the executable, like C and C++ compilers do when debug symbols are enabled.

0

精彩评论

暂无评论...
验证码 换一张
取 消