OleDbException | file.mdb'不是有效的路径

问题描述

我将网站的位置更改为E盘。 我们正在将 Plesk Asp.net comp。

一起使用。

我已将IIS -> Basic settings中的位置更改为正确的位置。 我的连接字符串是:

LocalSQLSerer = data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true

我从asp.net收到此错误

[OleDbException (0x80004005): 'C:\Inetpub\vhosts\domain.com\httpdocs\dir\App_Data\WebExpl.mdb' is not a valid path.  Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.]
   System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr,OleDbConnection connection) +971317
   System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options,Object poolGroupProviderInfo,DbConnectionPool pool,DbConnection owningObject) +86
   System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection,DbConnectionPoolGroup poolGroup) +29
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +4911356
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection,DbConnectionFactory connectionFactory) +117
   System.Data.OleDb.OleDbConnection.Open() +40
   Aster.Data.Access.DataSetAccess.OpenConnection(IDbConnection conn) +72
   Aster.Data.Access.DataSetAccess.FillData(DataTable dt,String order) +266
   Aster.Data.Access.DataSetAccess.FillData(DataSet ds,DataTable dt,String order) +63
   Aster.Data.Rules.DataSetRules.FillDataDirect(DbSettings dbSettings,DataSet ds,String order) +86
   AppCache.InitCache() +166
   AppCache.get_MultiLanguages() +8
   BasePage.InitializeCulture() +190
   ASP.default_aspx.__BuildControlTree(default_aspx __ctrl) +93
   ASP.default_aspx.FrameworkInitialize() +22
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint,Boolean includeStagesAfterAsyncPoint) +56
   System.Web.UI.Page.ProcessRequest() +80
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.default_aspx.ProcessRequest(HttpContext context) +4
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step,Boolean& completedSynchronously) +75

Web.config

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <configSections>
    <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup,System.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35">
      <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup,PublicKeyToken=31bf3856ad364e35">
        <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection,PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
        <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup,PublicKeyToken=31bf3856ad364e35">
          <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection,PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere" />
          <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection,PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
          <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection,PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
        </sectionGroup>
      </sectionGroup>
    </sectionGroup>
    <section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler,URLRewriter" />
  </configSections>
  <appSettings>
    <add key="errordetails" value="0" />
  </appSettings>
  <RewriterConfig>
    <!--  Url Rewrite rules: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/urlrewriting.asp -->
    <Rules>
      <RewriterRule>
        <LookFor>(.*taxon)-(.*)\.aspx\??(.*)</LookFor>
        <SendTo>$1.aspx?t=$2$3</SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>(.*taxalist)-(.*)\.aspx\??(.*)</LookFor>
        <SendTo>$1.aspx?l=$2$3</SendTo>
      </RewriterRule>
    </Rules>
  </RewriterConfig>
  <system.codedom>
    <compilers>
      <compiler language="c#;cs;csharp" extension=".cs" compilerOptions="/d:TRACE" warningLevel="1" type="Microsoft.CSharp.CSharpCodeProvider,System,Version=2.0.0.0,PublicKeyToken=b77a5c561934e089">
        <providerOption name="CompilerVersion" value="v3.5" />
        <providerOption name="WarnAsError" value="false" />
      </compiler>
    </compilers>
  </system.codedom>
  <system.web>
    <machineKey validationKey="4E7389973C005359F87CF6F715FB0360C330E2FC37EA40E313121537A78FCCC9FEF91DA2147DDD5D5D944D6A7A144D88616FF6775A1346A3B3D9832958332851" decryptionKey="A69F535808919FAE767057615E73283AC9B3CABE975C7E8BF3EF11CAB445F283" validation="SHA1" decryption="AES" />
    <browserCaps userAgentCacheKeyLength="256" />
    <pages theme="default" enableEventValidation="true" validateRequest="true" enableViewStateMac="true">
      <controls>
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions,PublicKeyToken=31bf3856ad364e35" />
      </controls>
    </pages>
    <!-- 50MB in Kbytes. Should be equal maxAllowedContentLength -->
    <httpRuntime maxRequestLength="51200" enableVersionHeader="false" />
    <customErrors mode="Off" defaultRedirect="errmsg.aspx" />
    <httpHandlers>
      <!-- IIS 6 -->
      <remove verb="*" path="*.asmx" />
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory,PublicKeyToken=31bf3856ad364e35" />
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory,PublicKeyToken=31bf3856ad364e35" />
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler,PublicKeyToken=31bf3856ad364e35" validate="false" />
      <add verb="*" path="MapHandler.ashx" type="MapHandler,App_Code" />
      <add verb="*" path="*js.axd" type="ScriptCompressorHandler" />
    </httpHandlers>
    <httpModules>
      <!-- IIS 6 -->
      <remove name="WindowsAuthentication" />
      <remove name="PassportAuthentication" />
      <remove name="AnonymousIdentification" />
      <remove name="UrlAuthorization" />
      <remove name="FileAuthorization" />
      <add type="URLRewriter.ModuleRewriter,URLRewriter" name="ModuleRewriter" />
    </httpModules>
    <httpCookies httpOnlyCookies="true" requireSSL="true" />
    <sessionState mode="InProc" cookieless="false" timeout="10" />
    <!--<sessionState mode="StateServer" stateConnectionString="tcpip=localhost:42424" cookieless="false" timeout="10" />-->
  </system.web>
  <system.net>
    <connectionManagement>
      <add address="*" maxconnection="40" />
    </connectionManagement>
  </system.net>
  <system.web.extensions>
    <scripting>
      <webServices>
        <jsonSerialization maxJsonLength="2097152" />
      </webServices>
      <scriptResourceHandler enableCompression="true" enableCaching="true" />
    </scripting>
  </system.web.extensions>
  <!-- IIS 7 -->
  <system.webServer>
    <urlCompression doDynamicCompression="true" doStaticCompression="true" dynamicCompressionBeforeCache="true" />
    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true">
      <remove name="WindowsAuthentication" />
      <remove name="PassportAuthentication" />
      <remove name="AnonymousIdentification" />
      <remove name="UrlAuthorization" />
      <remove name="FileAuthorization" />
      <remove name="UrlAddwww" />
      <remove name="ModuleRewriter" />
      <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule,PublicKeyToken=31bf3856ad364e35" />
      <add type="URLRewriter.ModuleRewriter,URLRewriter" name="ModuleRewriter" />
    </modules>
    <handlers accessPolicy="Read,Write,Script,Execute">
      <remove name="WebServiceHandlerFactory-Integrated" />
      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory,PublicKeyToken=31bf3856ad364e35" />
      <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory,PublicKeyToken=31bf3856ad364e35" />
      <add name="ScriptResource" preCondition="integratedMode" verb="GET,PublicKeyToken=31bf3856ad364e35" />
      <add name="MapHandler" verb="*" path="MapHandler.ashx" type="MapHandler,App_Code" />
      <add name="StrawberryPerl" path="*.pl" verb="GET,HEAD,POST" modules="CgiModule" scriptProcessor="C:\Strawberry\perl\bin\perl.exe &quot;%s&quot; %s" resourceType="Either" />
    </handlers>
    <staticContent>
      <clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="30.00:00:00" />
    </staticContent>
    <rewrite>
      <rules>
        <rule name="HTTP/S to HTTPS Redirect" enabled="true" stopProcessing="true">
          <match url="(.*)" />
          <conditions logicalGrouping="MatchAll">
            <add input="{HTTPS}" pattern="off" ignoreCase="true" />
            <add input="{REQUEST_URI}" negate="true" pattern="\.asmx$" ignoreCase="true" />
          </conditions>
          <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Permanent" />
        </rule>
        <rule name="Rewrite https imagelib request to http" enabled="true" stopProcessing="true">
          <match url="(.*)" />
          <conditions logicalGrouping="MatchAll">
            <add input="{URL}" pattern="^/unimusbilder/(.*)$" ignoreCase="true" />
          </conditions>
          <action type="Rewrite" url="http://www.unimus.no/felles/bilder/{C:1}" appendQueryString="true" />
        </rule>
      </rules>
      <outboundRules>
        <rule name="Add Strict-Transport-Security when HTTPS" enabled="true">
          <match serverVariable="RESPONSE_Strict_Transport_Security" pattern=".*" />
          <conditions>
            <add input="{HTTPS}" pattern="on" ignoreCase="true" />
          </conditions>
          <action type="Rewrite" value="max-age=31536000" />
        </rule>
      </outboundRules>
    </rewrite>
    <httpProtocol>
      <customHeaders>
        <remove name="X-Powered-By" />
        <remove name="X-Powered-By-Plesk" />
        <add name="X-UA-Compatible" value="IE=Edge" />
        <add name="X-XSS-Protection" value="1;mode=block" />
        <add name="X-Frame-Options" value="SAMEORIGIN" />
        <add name="X-Content-Type-Options" value="nosniff" />
        <add name="Content-Security-Policy" value="default-src 'none'; connect-src 'self'; img-src *; script-src 'unsafe-inline' 'unsafe-eval' *; style-src 'self' 'unsafe-inline'; font-src *; base-uri 'self'; form-action 'self'; frame-ancestors 'self'; " />
      </customHeaders>
    </httpProtocol>
    <security>
      <requestFiltering>
        <!-- 50MB in bytes,default is 30000000 (28.6102 Mb). Should be equal maxRequestLength -->
        <requestLimits maxAllowedContentLength="52428800" />
      </requestFiltering>
    </security>
  </system.webServer>
  <connectionStrings>
    <remove name="LocalMySqlServer" />
  </connectionStrings>
</configuration>

任何人都知道这里可能有什么问题吗? 我主要使用WP页面和Linux,这对我来说很希腊。 这些都是政府站点,因此反馈很容易得到

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...