Answered by:
ASP.NET works as website, server errors when use it as virtural directory

Question
-
User-12511125 posted
I have an ASP.net application, it works properly when I create a website on IIS.
Example: localhost://
Get following errors when I use virtual directory
localhost://cccnqa
Error message as follows:
_____________________
Server Error in '/ccnqa' 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: Reference.svcmap: Could not load file or assembly 'Microsoft.VisualStudio.Data, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Source Error:
[No relevant source lines]
Source File: /ccnqa/App_WebReferences/servicelogin/ Line: 1
Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.VisualStudio.Data, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' could not be loaded.
=== Pre-bind state information === LOG: User = IIS APPPOOL\ccn LOG: DisplayName = Microsoft.VisualStudio.Data, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (Fully-specified) LOG: Appbase = file:///C:/inetpub/wwwroot/ccnqa/ LOG: Initial PrivatePath = C:\inetpub\wwwroot\ccnqa\bin Calling assembly : MySql.VisualStudio, Version=6.5.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d. === LOG: This bind starts in default load context. LOG: Using application configuration file: C:\inetpub\wwwroot\ccnqa\web.config LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Post-policy reference: Microsoft.VisualStudio.Data, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/ccnqa/d27e5047/4b831462/Microsoft.VisualStudio.Data.DLL. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/ccnqa/d27e5047/4b831462/Microsoft.VisualStudio.Data/Microsoft.VisualStudio.Data.DLL. LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/ccnqa/bin/Microsoft.VisualStudio.Data.DLL. LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/ccnqa/bin/Microsoft.VisualStudio.Data/Microsoft.VisualStudio.Data.DLL. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/ccnqa/d27e5047/4b831462/Microsoft.VisualStudio.Data.EXE. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/ccnqa/d27e5047/4b831462/Microsoft.VisualStudio.Data/Microsoft.VisualStudio.Data.EXE. LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/ccnqa/bin/Microsoft.VisualStudio.Data.EXE. LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/ccnqa/bin/Microsoft.VisualStudio.Data/Microsoft.VisualStudio.Data.EXE.
_______________________
Any advice how to fix ?
Thanks!
ChiiwenFriday, April 19, 2013 1:20 PM
Answers
-
User-12511125 posted
Thanks for your help.
I found out the reason. It is due to missing some dll in Bin directory.
Just wonder why on it works properly as website.
Thanks!
Chiiwen
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, April 20, 2013 7:35 PM
All replies
-
User-1716253493 posted
maybe you forget to configure cccnqa as an application. You should add it using add application instead add virtual directory. Another possible is permission issue.Friday, April 19, 2013 3:41 PM -
User-12511125 posted
Thanks for your help. I configure ccnqa as an application.
What kind of permission issue I should check? ccnqa works properly as website.
Thanks!
Chiiwen
Friday, April 19, 2013 3:46 PM -
User-12511125 posted
include web.config for ccnqa
-----------------------
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
<system.web>
<globalization fileEncoding="big5" />
<customErrors mode="Off" />
<httpHandlers>
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" />
</httpHandlers>
<compilation targetFramework="4.0" debug="true">
<assemblies>
<add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Xaml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="WindowsFormsIntegration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="MySql.Data, Version=6.6.4.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D" />
<add assembly="MySql.Data.Entity, Version=6.6.4.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D" />
<add assembly="MySql.Web, Version=6.6.4.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D" />
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
</assemblies>
<buildProviders>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</buildProviders>
</compilation>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<handlers>
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</handlers>
</system.webServer>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="nusoapBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost/bridge/authorize.soap.php" binding="basicHttpBinding" bindingConfiguration="nusoapBinding" contract="servicelogin.nusoapPortType" name="nusoapPort" />
</client>
</system.serviceModel>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework">
<parameters>
<parameter value="Data Source=.\SQLEXPRESS; Integrated Security=True; MultipleActiveResultSets=True" />
</parameters>
</defaultConnectionFactory>
</entityFramework>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.6.4.0" newVersion="6.6.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
------------------------------Friday, April 19, 2013 5:05 PM -
User-1716253493 posted
what net version displayed at the bottom detailed error messages?Friday, April 19, 2013 8:37 PM -
User-12511125 posted
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929
Thanks for your help!
Chiiwen
Friday, April 19, 2013 11:05 PM -
User-12511125 posted
Thanks for your help.
I found out the reason. It is due to missing some dll in Bin directory.
Just wonder why on it works properly as website.
Thanks!
Chiiwen
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, April 20, 2013 7:35 PM