ASP.NET Stack Trace Question - asp.net

This is something that I have been curious about for a bit, but have never found the solution to:
After I publish an application to a server, if it throws an error, the Stack Trace still contains references to my local environment. E.G.:
at [appname].dropdown.OnLoad(EventArgs e) in C:\Documents and Settings\[user]\Desktop\[solution]\[project]\dropdown.cs:line 74
Why does it refer to my local paths instead of the servers paths of these objects?
Thanks.

As the debug information contains the file name at the moment that it was compiled. It's just a text value, it's not updated with the path of the actual file.
The actual name of the file wouldn't be very useful anyway, as that would be some generated file name somewhere in the .NET cache folder.

It's probably because you published a compiled version built on your machine.

Related

Circular file references are not allowed Dnn 7+ in TFS 2013

I am using DNN 7.3 for a website project which is a combination of VB and C# codes. I use visual studio 2013 to build the project.
If the MSBuid Option in property page is configured to Allow this Precompiled site to be updatable and the project is published.
There will be a successful built. But when it is checked in to the TFS, the following exception will be thrown:
/compiled/DesktopModules/Admin/Security/manageusers.ascx (8): Circular file references are not allowed.
/compiled/DesktopModules/Admin/Security/manageusers.ascx (67): Unknown server tag 'dnn:profile'.
/compiled/DesktopModules/Admin/Security/EditUser.ascx (5): Circular file references are not allowed.
/compiled/DesktopModules/Admin/Security/EditUser.ascx (163): Unknown server tag 'dnn:Profile'.
/compiled/admin/Users/ViewProfile.ascx (4): Unknown server tag 'dnn:Profile'.
Also, when I checked Use Fixed Naming and Single Page Assemblies together with the Allow this Precompiled site to be updatable. it will throw:
ASPNETCOMPILER: Object reference not set to an instance of an object.
when I searched online, I was given two options from this blog.
I have tried the two but still having the same error.
I don't know what I am doing wrong.
Please look at [here] (http://ellisweb.net/2009/12/fixing-the-circular-file-references-are-not-allowed-error-in-asp-net/) for the explanation why you would see this error, simply speaking, if you have the following setup:
/folder1/Control1.ascx > References Control2
/folder2/Control2.ascx > References Control3
/folder1/Control3.ascx
This means that the folder1 dll will reference the folder2 dll which will again reference the folder1 dll, causing a “circular file reference”.
The solution is try to rearrange all controls under each folders, sometimes, you have to make a problem user control copied over to multiple folders to prevent such circular calling.
I changed The Clean WorkSpace property of TFS Build Process Parameters to false.
The error just disappeared and I was able to build successfully into TFS Drop folder. I don't know why this solves the problem but the problem was resolved.

Unable to load DLL 'xmogrt': from Tridion metadata query

I'm trying to use the CustomMetaKeyCriteria class to pull back content from the Broker DB based upon some metadata I set up. However, I get the error listed below. Any ideas? That dll is in my bin folder & I confirmed it is the 32 bit version, as this code is running on a 32 bit box. I missed some set up obviously, but what?
Unable to load DLL 'xmogrt': The specified module could not be found.
(Exception from HRESULT: 0x8007007E)
Check if you have the rest of the dll dependencies for this file?
In my install folder for x86 I see the following DLLs:
MSVCP71.dll
MSVCR71.dll
netrtsn.dll
Tridion.ContentDelivery.Configuration.dll
Tridion.ContentDelivery.dll
Tridion.ContentDelivery.Interop.dll
xmogrt.dll
EDIT: And the following Tridion jars:
cd_broker
cd_cache
cd_core
cd_datalayer
cd_deployer
cd_linking
cd_model
cd_tcdl (not usually needed)
You should probably check cd_core_log for additional details, maybe you're missing one of the 3rd party jars.
Your DLL may be blocked if you copied it from a network location. Try right clicking on the DLL > Properties > Unblock

asp.net error “The type 'typeName' exists in both ”temp1.dll“ and ”temp2.dll"

When I build a web site I haven't got errors, but when I try to publish site the error appears:
Type 'AttachmentsControl' exists in both в 'c:\Users\userName\AppData\Local\Temp\Temporary ASP.NET Files\web.ui.application\8c85983a\5425041a\App_Web_mivbsgll.dll' and 'c:\Users\userName\AppData\Local\Temp\Temporary ASP.NET Files\web.ui.application\8c85983a\5425041a\App_Web_dhvduebi.dll'
I tried to add the batch="false" attribute to the "compilation" element of the web.config file, but this didn't help.
Also I tried to rename one class, but in this case another error appears:
Server Error in '/projectName' Application.
Thread was being aborted.
Can anybody help me?
P.S.: the most strangest thing is that I get this project from MS TFS, my colleague who add this project to TFS publish this site without errors.
Most probably the reason could be you are uploading the source files along with compiled published output and at the same time the source files are modified.
When you see this error, what asp.net is trying to do is, compile the files and create the application and the result is, you have two type declaration of same name, one in the dll and one in the source.
Try to delete the dll file you have uploaded (from the bin directory), it should resolve the issue.

app.config in other directory

A web service client (WCF) is compiled as a DLL, then comes the dll into the folder "c:\windows\assembly" ... just like I can now say that my DLL in C:\client\client.dll.config is expected?
It would perhaps also the possibility that the program store directly, the problem is that it starts from a SharePoint workflow that is surely not quite that simple.
It may sound silly, but the problem sounds so simple ... Unfortunately I have found so far after a while no concrete solution to Find.
EDIT:
No idea? It is the despair, I am running out of time and I have so much work to implement all this, and such a ridiculous number of hours to keep me?
I've found a lot in terms of editing files, but I will not change it I will change only the access to another directory where the file is ...
In the proxy classes, we refer only so eager ...
[System.ServiceModel.ServiceContractAttribute
(Name = "_-ASD_-CAS01D0005P0000013203",
Namespace = "urn:sap-com:document:sap:soap:functions:mc-style",
ConfigurationName = "_ASD_CAS01D0005P000001320")
]
There must theoretically be possible to simply change the ...
I'm just trying to throw it somewhere in the folder of SharePoint, there is the program being started. The file is from "C:\Windows\system32\inetsrv" started, but on this directory, the dll probably does not have access, because I still get the same error as if there was no config file there.
The file is from "C:\Windows\system32\inetsrv" started, but on this directory, the dll probably does not have access, because I still get the same error as if there was no config file there.
Finally solved by
AppDomain.CurrentDomain.GetData ("APP_CONFIG_FILE");
I can not find it an addictive client.dll.config, but instead the web.config in SharePoint virtual directory "c:\inetpub\wwwroot\wss\Virtual Directories\80\" searches. I added the information there and it works fine!

ASP.NET MVC 2.0 NHibernate Configure() issue

I have installed NHibernate for my ASP.NET web app although I'm getting a problem in real-time on the following line of code:
if (_sessionFactory == null)
{
_sessionFactory = new Configuration().Configure().BuildSessionFactory();
}
Looking at the inner exception the problem is this:
{"Could not find file 'D:\Websites\Test\Test\Test\bin\hibernate.cfg.xml'.":"D:\Websites\Test\Test\Test\bin\hibernate.cfg.xml"}
This makes sense, as the file doesnt exist in that location. This line of code is within my Core project. File hibernate.cfg.xml is currently in my Infrastucture project, not my Core. Should this be? I have copied the file into this location although I still get problems. If I manually copy the file into this location within windows explorer I then get the following error during runtime.
{"Could not load file or assembly
'Infrastructure' or one of its
dependencies. The system cannot find
the file specified.":"Infrastructure"}
Also, I'm missing DynamicProxy.dll as I'm using castle and I couldnt see a version of the DynamicProxy in the castle folder that I downloaded from http://sourceforge.net/projects/nhibernate/
any suggestions? I can see LinFu.DynamicProxy.dll within the download although it says I only need one of the folders, Linfu or Castle, and I'm using Castle for this experiment. Not sure if this has anything to do with it, just thought it might help.
any ideas? Many thanks,
James
About "Could not find hibernate.cfg.xml": you can either set it to "Copy to Output" (see this) or configure it as an embedded resource.
About "Could not load assembly Infrastructure": you're missing Infrastructure.dll in your bin, or one of its dependencies, just as the error says.
About missing DynamicProxy.dll: if you're using NHibernate 3.x all you need to use the Castle bytecode provider is NHibernate.ByteCode.Castle.dll and Castle.Core.dll

Resources