Deploying VS2005 app loses a reference

I've got an application that uses an ianywhere (Sybase) reference. In my development workstation the project works flawlessly. When I deploy, either copy website or publish website, and then run the website I get an error that the web.config cannot find a reference file. How can I remedy this situation?

This is the error and the web.config:

Detailed error information follows:

Exception Type:        System.IO.FileNotFoundException
Exception Message:     Could not load file or assembly 'iAnywhere.Data.AsaClient, Version=9.0.1.1873, Culture=neutral, PublicKeyToken=f222fc4333e0d400' or one of its dependencies. The system cannot find the file specified.
Exception Source:      mscorlib
Exception Target Site: nLoad

---- Stack Trace ----
   System.Reflection.Assembly.nLoad(fileName As AssemblyName, codeBase As String, assemblySecurity As Evidence, locationHint As Assembly, stackMark As StackCrawlMark&, throwOnFileNotFound As Boolean, forIntrospection As Boolean)
       (unknown file): N 00000
   System.Reflection.Assembly.InternalLoad(assemblyRef As AssemblyName, assemblySecurity As Evidence, stackMark As StackCrawlMark&, forIntrospection As Boolean)
       (unknown file): N 00211
   System.Reflection.Assembly.InternalLoad(assemblyString As String, assemblySecurity As Evidence, stackMark As StackCrawlMark&, forIntrospection As Boolean)
       (unknown file): N 00141
   System.Reflection.Assembly.Load(assemblyString As String)
       (unknown file): N 00025
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(assemblyName As String, starDirective As Boolean)
       (unknown file): N 00032



(Outer Exception)
Date and Time:         5/1/2006 9:48:32 PM
Machine Name:          CLTECDEV7
Process User:          NT AUTHORITY\NETWORK SERVICE
Remote User:          
Remote Address:        10.71.149.33
Remote Host:           10.71.149.33
URL:                   http://cltecdev7/claimscontrol2/default.aspx

NET Runtime version:   2.0.50727.42
Application Domain:    /LM/W3SVC/1/Root/claimscontrol2-1-127909600089062500
Assembly Codebase:     C:/WINDOWS/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
Assembly Full Name:    System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Assembly Version:      2.0.0.0
Assembly Build Date:   12/29/2005 10:51:36 AM

Exception Type:        System.Configuration.ConfigurationErrorsException
Exception Message:     Could not load file or assembly 'iAnywhere.Data.AsaClient, Version=9.0.1.1873, Culture=neutral, PublicKeyToken=f222fc4333e0d400' or one of its dependencies. The system cannot find the file specified. (c:\inetpub\wwwroot\claimscontrol2\web.config line 63)
Exception Source:      System.Web
Exception Target Site: LoadAssemblyHelper

---- Stack Trace ----
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(assemblyName As String, starDirective As Boolean)
       (unknown file): N 00596
   System.Web.Configuration.CompilationSection.LoadAssembly(ai As AssemblyInfo)
       (unknown file): N 00070
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(compConfig As CompilationSection)
       (unknown file): N 00177
   System.Web.Compilation.BuildProvidersCompiler..ctor(configPath As VirtualPath, supportLocalization As Boolean, outputAssemblyName As String)
       (unknown file): N 00180
   System.Web.Compilation.BuildManager.CompileWebFile(virtualPath As VirtualPath)
       (unknown file): N 00207
   System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(virtualPath As VirtualPath, noBuild As Boolean, allowCrossApp As Boolean, allowBuildInPrecompile As Boolean)
       (unknown file): N 00580
   System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(context As HttpContext, virtualPath As VirtualPath, noBuild As Boolean, allowCrossApp As Boolean, allowBuildInPrecompile As Boolean)
       (unknown file): N 00093
   System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(virtualPath As VirtualPath, context As HttpContext, allowCrossApp As Boolean, noAssert As Boolean)
       (unknown file): N 00111
   System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(virtualPath As VirtualPath, requiredBaseType As Type, context As HttpContext, allowCrossApp As Boolean, noAssert As Boolean)
       (unknown file): N 00054
   System.Web.UI.PageHandlerFactory.GetHandlerHelper(context As HttpContext, requestType As String, virtualPath As VirtualPath, physicalPath As String)
       (unknown file): N 00031
   System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(context As HttpContext, requestType As String, virtualPath As VirtualPath, physicalPath As String)
       (unknown file): N 00040
   System.Web.HttpApplication.MapHttpHandler(context As HttpContext, requestType As String, path As VirtualPath, pathTranslated As String, useAppConfig As Boolean)
       (unknown file): N 00139
   System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       (unknown file): N 00120
   System.Web.HttpApplication.ExecuteStep(step As IExecutionStep, completedSynchronously As Boolean&)
       (unknown file): N 00155

==================================
Web.config (look in the ASSEMBLIES section
==================================

<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
      <configSections>
            <section name="UnhandledException" type="System.Configuration.NameValueSectionHandler, &#xA;                  System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
      </configSections>
      <UnhandledException>
            <add key="AppName" value="Claims Control"/>
            <add key="ContactInfo" value="Claims Control Support Team"/>
            <add key="LogToEventLog" value="False"/>
            <add key="LogToFile" value="True"/>
            <add key="LogToEmail" value="False"/>
            <add key="LogToUI" value="True"/>
            <add key="PathLogFile" value="c:\ClaimsControlErrors\"/>
            <add key="IgnoreRegex" value=""/>
            <add key="IgnoreDebug" value="False"/>
            <add key="WhatHappened" value="There was an unexpected error in this website. The error has been logged."/>
            <add key="HowUserAffected" value="The current page will not load."/>
            <add key="WhatUserCanDo" value="Press the F5 key on your keyboard. If you get this error message again contact (contact)."/>
      </UnhandledException>
      <connectionStrings>
            <add name="SiteMapDatabaseConnectionString" connectionString="Data Source=CLTG2W6431;Initial Catalog=SiteMapDatabase;Persist Security Info=True;User ID=sa;Password=sterling" providerName="System.Data.SqlClient"/>
            <add name="ca11auditConnectionString" connectionString="Data Source=CLTG2W6431;Initial Catalog=ca11audit;Persist Security Info=True;User ID=sa;Password=sterling" providerName="System.Data.SqlClient"/>
            <add name="ca11webdevConnectionString" connectionString="Data Source=CLTECDEV5\DEV;Initial Catalog=ca11webdev;User ID=Install;Password=LiveStrong" providerName="System.Data.SqlClient"/>
      </connectionStrings>
      <appSettings>
            <add key="check_cookie" value="false"/>
            <add key="SeamlessAuthentication" value="false"/>
            <add key="skip_check_for_ratna" value="true"/>
            <add key="TSHLoginURL" value="https://portal.transactions.mckhboc.com"/>
            <add key="AuthenticateErrorURL" value="default.aspx?error=true"/>
            <add key="allow2digitYr" value="true"/>
            <add key="ProductPartNumber" value="4ACDBCEC78ABAADA957E5209BF"/>
            <add key="pathName" value="c:/CA10_0/"/>
            <add key="server" value="Cltecdev5\dev"/>
            <add key="database" value="ca11webdev"/>
            <add key="user" value="Install"/>
    <add key="password" value="LiveStrong"/>
            <add key="conString" value="server=cltecdev5\dev;database=ca101dev;uid=B34;pwd=Ec2KWeb"/>
            <add key="HCFADLLPath" value="C:\\Inetpub\\wwwroot\\ecuiunbound\\bin\\Ecghcfa.dll"/>
      </appSettings>
      <system.web>
            
            <siteMap>
                  <providers>
                        <add name="AspNetXMLSiteMapProvider1" type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="web.default.sitemap"/>
                        <add name="AspNetXMLSiteMapProvider2" type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="web.claims.sitemap"/>
                  </providers>
            </siteMap>
            <!--  DYNAMIC DEBUG COMPILATION
          Set compilation debug="true" to enable ASPX debugging.  Otherwise, setting this value to
          false will improve runtime performance of this application.
          Set compilation debug="true" to insert debugging symbols (.pdb information)
          into the compiled page. Because this creates a larger file that executes
          more slowly, you should set this value to true only when debugging and to
          false at all other times. For more information, refer to the documentation about
          debugging ASP .NET files.
    -->
            <compilation defaultLanguage="c#" debug="true" batch="false">
                  <compilers>
                        <compiler language="c#" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" extension=".cs" compilerOptions="/d:DEBUG;TRACE"/>
                  </compilers>
                  <assemblies>
                        <add assembly="iAnywhere.Data.AsaClient, Version=9.0.1.1873, Culture=neutral, PublicKeyToken=F222FC4333E0D400"/>
                        <add assembly="policy.9.0.iAnywhere.Data.AsaClient, Version=9.0.1.1873, Culture=neutral, PublicKeyToken=F222FC4333E0D400"/>
                        <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                        <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                        <add assembly="System.Management, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>
            </compilation>
            <!--  CUSTOM ERROR MESSAGES
          Set customError mode values to control the display of user-friendly
          error messages to users instead of error details (including a stack trace):

          "On" Always display custom (friendly) messages  
          "Off" Always display detailed ASP.NET error information.
          "RemoteOnly" Display custom (friendly) messages only to users not running
          on the local Web server. This setting is recommended for security purposes, so
          that you do not display application detail information to remote clients.
    -->
            <customErrors mode="Off"/>
            <!--  AUTHENTICATION
          This section sets the authentication policies of the application. Possible modes are "Windows", "Forms",
          "Passport" and "None"
    -->
            <authentication mode="Windows"/>

            <!--  APPLICATION-LEVEL TRACE LOGGING
          Application-level tracing enables trace log output for every page within an application.
          Set trace enabled="true" to enable application trace logging.  If pageOutput="true", the
          trace information will be displayed at the bottom of each page.  Otherwise, you can view the
          application trace log by browsing the "trace.axd" page from your web application
          root.
    -->
            <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true"/>
            <!--  SESSION STATE SETTINGS
          By default ASP .NET uses cookies to identify which requests belong to a particular session.
          If cookies are not available, a session can be tracked by adding a session identifier to the URL.
          To disable cookies, set sessionState cookieless="true".
    -->
            <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;user id=sa;password=" cookieless="false" timeout="20"/>
            <!--  GLOBALIZATION
          This section sets the globalization settings of the application.
    -->
            <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
            <httpModules>
                  <add name="UehHttpModule" type="ASPUnhandledException.UehHttpModule, ASPUnhandledException"/>
            </httpModules>
            <xhtmlConformance mode="Legacy"/>
      </system.web>
</configuration>
LVL 2
sutoriusAsked:
Who is Participating?
 
GavinMannionCommented:
Inside your VS you should be able to view the properties of the reference, make sure the option [Copy Local] is set to true.
0
 
flavoCommented:
Does the server that it is being deployed on have the assembly iAnywhere.Data.AsaClient?
0
 
sutoriusAuthor Commented:
Well when I do a search for iAnywhere.Data.AsaClient there are no results. However, for version 1 of this website in order for the ianywhere to work I had to deploy Sybase runtime files to that server. I just compared the bin folders for version1 (built with VS2003) and version 2 and both have the same ianywhere dll's but they aren't called iAnywhere.Data.AsaClient.
0
 
sutoriusAuthor Commented:
There were 2 dll's in the GAC. I removed the references to the GAC and reinstalled to the bin and everything deploys fine now. Thanks for the help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.