ASP.NET IIS error while deploying Excel libraries - asp.net

I am getting error while deployed the asp.net Application in IIS 7.5 on Windows Server 2008. I have referenced Excel 2007 which is also present in Windows Server 2008.
Here is my web.config code
<system.web>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="Microsoft.VisualC, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/>
<add assembly="Microsoft.Office.Tools.Excel.v9.0, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
</assemblies>
</compilation>
Getting following error message
Server Error in '/dev' 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: Could not load file or assembly 'Microsoft.Office.Tools.Excel.v9.0, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Source Error:
An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Source File: C:\inetpub\wwwroot\dev\web.config Line: 32
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.Office.Tools.Excel.v9.0, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' could not be loaded.

try this solution.
1.Open Visual studio -> visual Studio tools -> Visual studio command prompt
2.Run following command
C:\Windows\system32>gacutil /i c:\Microsoft.VisualStudio.Tools.Office.Runtime.v9.0 (Location of dll)
3. Restart your computer and try.

Related

Configuration Error on web host ,Could not load file or assembly

Please i want to solve this problem i did .aspx web application and when i try to publish it by GearHost i face this problem
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: Could not load file or assembly 'MySql.Data, Version=8.0.18.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.
Source Error:
An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Source File: C:\home\site\wwwroot\web.config Line: 14
Assembly Load Trace: The following information can be helpful to determine why the assembly 'MySql.Data, Version=8.0.18.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3429.0
and my web.config is
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<appSettings>
<add key="ValidationSettings:UnobtrusiveValidationMode" value="None"/>
</appSettings>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true" targetFramework="4.5">
<assemblies>
<add assembly="MySql.Data, Version=8.0.18.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>
</assemblies>
</compilation>
<httpRuntime targetFramework="4.5"/>
</system.web>
</configuration>
Please can anyone help me

Parser Error Message: Could not load file or assembly. But the assembly is there

I do not understand from where this problem comes. I have the correct assembly in the Bin, the same is correctly referenced in the web.config
<compilation targetFramework="4.5" debug="true">
<assemblies>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="Telerik.ReportViewer.WebForms, Version=8.1.14.804, Culture=neutral, PublicKeyToken=A9D7983DFCC261BE"/>
</assemblies>
</compilation>
....
<httpHandlers>
.........
<add path="Telerik.ReportViewer.axd" verb="*" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=8.1.14.804, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" validate="true"/>
</httpHandlers>
the particular feature object of the error is working on my developing machine but on the production server I get this error!
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 load file or assembly 'Telerik.Reporting, Version=8.1.14.804, Culture=neutral, PublicKeyToken=a9d7983dfcc261be' or one of its dependencies. The located assembly's manifest definition
does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source Error:
Line%70<td%class="leftGridColumn"> </td>
Line%71:<td%class="centerGridColumn">
Line%72<telerik:ReportViewer%ID="ReportViewer1"%runat="server"%Width="100%"%Height="660px"%ShowExportGroup="False"%
Line%73:</td>
Line%74:<td%class="rightGridColumn"> </td>
Any hint will be really appreciated I do not know what else do do to solve this problem.
The only thing I can think of is 'Are you sure you are using the correct/compatible version of the .Net Framework?'. I had a problem a while back when using Asp.Net MVC where it didn't like 4.5, so i had to create a 4.0 project.
EDIT
Just found this on an old blog:
The original warning you receive explains that you should register the handler for the web report viewer in the httphandlers section in the web config. However if you're hosting the application in IIS7, there is a different section to add the handler to, namely the <system.webServer>\<handlers> section:
<system.webServer>
<handlers>
<add name="Telerik.ReportViewer.axd_*" path="Telerik.ReportViewer.axd" verb="*" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=3.2.9.1211, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" preCondition="integratedMode,runtimeVersionv2.0" />
</handlers>
<validation validateIntegratedModeConfiguration="false" />
</system.webServer>
"it clearly states that it cannot find a necessary assembly you're referencing. During the installation of Telerik Reporting on your machine, the Telerik assemblies were added to GAC. When deploying a Web Site project the assemblies from the GAC are not copied automatically, so you need to copy the assemblies manually from the installation’s Telerik Reporting /bin folder to the bin folder of your application on the server. Full step by step instructions on deploying are included in the Deploying Applications using Telerik Reporting help article."
Here's the link: http://www.telerik.com/forums/web-reportviewer-error

Connection 'LocalSqlServer' was not found in the applications configuration or the connection string is empty

I am using windows 8.1 on which I have installed VS2012 and VS2013 and I am running my website on IIS but whenever I run my project it gives an error about LocalSqlServer connection string is empty in my machine config. I looked at my machine config under "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config" directory and found that connection string is there. I have nearly spent 2 days but couldn't get my site to run on IIS. Any help is appreciated?
Server Error in '/GCC.Server' 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: The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty.
Source Error:
Line 257: <roleManager>
Line 258: <providers>
Line 259: <add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 260: <add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 261: </providers>
Source File: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config Line: 259
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34009
This is the complete error as image was not readable due to my laptop resolution.
I got it working and got bit late to reply. Answer is very simple in my case issue was under IIS. I went to IIS. Selected defualt website and clicked on modules. Under modules just remove System.Web.Security.RoleManagerModule.

Deployment with Servicestack.Text 4.0.18 in WCF

![enter image description here][1]I've build a WCF Class library project in which I've used ServiceStack.Text assembly version 4.0.18 .
My whole soultions is build against .NET 4.0.
The project works fine when debugging, using ASP.NET self-hosting. But I've made another WCF Service Application which includes this class library and I want to deploy the WCF application on IIS, I've deployed on IIS but I get the following 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: Could not load file or assembly 'AdCarWebService' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
Source Error:
Line 57: <add assembly="System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 58: <add assembly="System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 59: <add assembly="*"/>
Line 60: <add assembly="System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"/>
Line 61: <add assembly="System.IdentityModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"/>

crystal reports error in silverlight application on installation

I have pubslihed an silverlight application which has crystal reports in the IIS server it shows me the error as below could any one help me to resolve
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: Could not load file or assembly 'CrystalDecisions.ReportAppServer.Controllers, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 32: <add assembly="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
Line 33: <add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
Line 34: <add assembly="CrystalDecisions.ReportAppServer.Controllers, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
Line 35: <add assembly="CrystalDecisions.ReportAppServer.DataDefModel, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
Line 36: <add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
Based on teh error message, it seems that the crystal report version installed on your system does not match the crystal report version you used on your code. Please double check it so that you can sync the crystal report version for your site.
Besides, there are several requirements to run Crystal Report properly:
Please make sure the CR version installed on the server matches the one you use on your application/website
Please make sure that the assemblies of the CR installed on the server are referenced correctly on your web.config
Please make sure you set the application pool of your application to operate under LOCAL SERVICE permission
Please make sure FULL TRUST mode is enabled on your operating folder
Please make sure crystalreportviewer and aspnet_client folders are copied to your operating folder.
I have been using Crystal Report for a while. I have also tried the latest Crystal Report for VS 2010 and initially, I experienced the problem like you do now. By following all the steps above, your CR will certainly work fine. Should you still have problems, you can consider hosting it withasphostcentral.com
Please mark this response as an "answer" if it helps you. Thanks heaps!

Resources