Run time error in ASP.Net 1.1 - asp.net

I am using Windows 2003. I have mapped a web application into a virtual directory. This is built on framework 1.1 When i try to browse to the default page i get a error as
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Access is denied: 'Interop.MSDASC'.
Source Error:
Line 196:
Line 197:
Line 198:
Line 199:
Line 200:
Source File: c:\windows\microsoft.net\framework\v1.1.4322\Config\machine.config Line: 198
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Interop.MSDASC' could not be loaded.

Line 198 of the standard machine.Config contains the line:
<add assembly="*"/>
which I assume is loading all assemblies from your local bin directory. It seems this directory contains an assembly Interop.MSDASC, and that IIS is unable to load this assembly because of an "Access Denied" error.
Some things to check:
does the account under which your web app is running (by default the Network Service account) have permission to access this file.
does your web app really need this assembly? AFAIK tt's for the Microsoft Data Link API, which allows the app to prompt the user for OLEDB connection information - I don't see why you'd use this in a web app.

Two thoughts...
Is the Interop.MSDASC dll in your web apps bin folder? Is the com components that this interop library uses installed on this machine?
Are there any funky things going on with permissions for these files?
Good luck, sounds like a nasty one.

Related

Security Exception with SelectPdf .net

I have unloaded the version free Community Edition from
http://selectpdf.com/html-to-pdf/demo/
Because I wanted to use the example that turned a page html into pdf.
In visual studio I have succeeded in using the file asp.net but when I put it online I receive this error:
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: That assembly does not allow partially trusted callers.
I have loaded the files on three different servers.
Azure, Aruba and Godaddy, but do I always receive the same error, as I can resolve?
http://pdf.cyberkings.fr/html-to-pdf-converter.aspx
http://www.numero-telefono.it/html-to-pdf-converter.aspx
Thanks
Conversion failure. Could not find 'Select.Html.dep'.
Description: An unhandled exception occurred during the execution of the current web request
When installing Select.HtmlToPdf from NuGET, the installation copies the dependancy file Select.Html.dep to the bin. When you build, a copy gets placed in the /bin beside Select.HtmlToPdf.dll.
However, when deploying your application, the dependency file does not get copied automatically.
You need to copy Select.Html.dep manually.
See the SelectPdf Html To Pdf Converter for .NET deployment documentation.

Missing assembly 'dnx.clr.managed'

I am trying to deploy an ASP.NET 5 application to my 64-bit Windows Server 2008 R2 server. I created a blank web application and set up a file system publish profile using dnx-clr-win-x64.1.0.0-beta4. I copied the results from the publish location to a folder on my server and created a new virtual directory with a .NET 4.0 app pool pointing at the wwwroot folder of my application. However, when I try to browse to the site, I get this error:
Could not load file or assembly 'dnx.clr.managed' or one of its
dependencies. The system cannot find the file specified.
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.IO.FileNotFoundException: Could not load file or assembly
'dnx.clr.managed' or one of its dependencies. The system cannot find
the file specified.
The same steps on my local PC (where I have Visual Studio 2015 installed) work correctly so it seems like I need to install something else on my server. I have already installed .NET 4.6 on this server without success. Does anyone know what I am missing?
I found the solution thanks to this question: Azure deployment : Could not load file or assembly 'dnx.clr.managed' or one of its dependencies. The system cannot find the file specified
At first I thought that wasn't the answer because it didn't work when I changed my publish profile from dnx-clr-win-x86.1.0.0-beta4 to dnx-clr-win-x64.1.0.0-beta4. However, I later noticed that approot/packages folder didn't have the x64 package. So I deleted everything and re-published with my new profile and the page loaded.
Change the dependencies file to the current version, whether it is 1.0.0-beta7 or 1.0.0-beta6 ensure that you go to nuget package manager and install the appropriate version rebuild the solution you should see file updates from your output windows.

ASP.Net Deployment Error: Could not load file or assembly

I have a asp.net website in .Net 4.0 that runs fine in our staging environment. When we moved it into production we are getting following error
Server Error in '/mysite' Application.
Could not load file or assembly 'SupportSite.UI' or one of its dependencies. Access is denied.
Exception Details: System.IO.FileLoadException: Could not load file or assembly 'SupportSite.UI' or one of its dependencies. Access is denied.
I assume it is a security issue. It is deployed using IIS WAS settings.
What are the users for whom I need to grant permission (and on what all folders)?
What is the user corresponding to aspnet_wp.exe or w3wp.exe?
REFERENCES
Could not load file or assembly or one of its dependencies. Access is denied. The issue is random, but after it happens once, it continues
Could not load file or assembly 'Telerik.Web.UI' or one of its dependencies
ApplicationPoolIdentity permissions on Temporary Asp.Net files
could not load file or assembly, Tried all solution on net
You need to grant read permission for the lib folder to IIS_IUSRS account.
I asume your using IIS 7.5..
You have two choices: Adding your library to GAC, or give read permissions to the application pool account.
See this about app pool account permissions:
http://www.iis.net/learn/manage/configuring-security/application-pool-identities

Upgrading to 2K8 Server, An error occurred loading a configuration file: Failed to start monitoring changes to '\\networkshare'

I moved my site off of a 2k3 server over to a 2k8 server. The site has a virtual directory pointed to a network share which has different credentials than the one used by the site. I set the virtual directory to use the correct credentials and it can browse the share fine through explorer, but when I try to load files (images, etc) through a browser I get the following asp.net error:
Server Error in '/' Application.
Configuration Error Description: An error occurred during the
processing of a configuration file required to service this request.
Please review the specific error details below and modify your
configuration file appropriately.
Parser Error Message: An error occurred loading a configuration file:
Failed to start monitoring changes to '\\networkshare'.
Source Error:
[No relevant source lines]
Source File: \\networkshare\web.config Line: 0
Version Information: Microsoft .NET Framework Version:2.0.50727.5456;
ASP.NET Version:2.0.50727.5456
The network share does not have a web.config.
I tried the solution provided here, but that did not solve the issue and this site isn't using impersonation. Do I need to enable impersonation? This was working correctly on win2k3.
OK, so based on our comments it sounds like this is either a share permissions problem or an NTFS permissions problem (same resolution, different dialog).
In IIS6 you typically had the worker process running as NETWORK SERVICE and that's what you would give permissions to to access shares and files on the network.
In IIS7.5 the application pools now run under an AppPool identity, one specific to the application pool that the website is running under. This link should be helpful: http://learn.iis.net/page.aspx/624/application-pool-identities/
As a quick fix (although I recommend reading up on it) though, you can go into the application pool, go to advanced properties, and set the identity back to NETWORK SERVICE.

Problem deploying webservice "Could not create type 'Service'

I have big trouble deploying my webservice. It is the basic helloWorld start webservice.
At my localhost everything os ok. But when I copy the service to my server in my virtual directory i recieve this error:
Server Error in '/' Application.
Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not create type 'Service'.
Source Error: Line 1: <%# WebService Language="vb" CodeBehind="~/App_Code/Service.vb" Class="Service" %>
Source File: /customers/iv_webservice/Service.asmx Line: 1
Version Information: Microsoft .NET Framework Version:2.0.50727.4952; ASP.NET Version:2.0.50727.4955
Now I have tried almost everything. Including scanning the web for the past 9 hours for an answer.
I know my virtual directory in the web.config is ok, since I have other virtual websites on my server. I even manage to have aspx. files in the same directory and they are ok.
Now, what am I missing?
Does your web service use a 3rd party assembly or unmanaged Dll that is not deployed to the server? In my experience "cannot create object of type" errors are missing unmanaged Dlls. In the case of missing managed assemblies, the error will usually tell you which assembly is missing.
Can you try compiling the service.vb as an standalone assembly? That might help understand any dependencies you might not be satisfying.. You might also see additional information in Event viewer or if you set the debug mode to true in web.config to see if there are any errors reported compiling service.vb.

Resources