Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net OLEDBEException | file.mdb';不是有效的路径_Asp.net_Oledb_Plesk - Fatal编程技术网

Asp.net OLEDBEException | file.mdb';不是有效的路径

Asp.net OLEDBEException | file.mdb';不是有效的路径,asp.net,oledb,plesk,Asp.net,Oledb,Plesk,我将网站的位置更改为我的电子驱动器。 我们正在将Plesk与Asp.netcomp一起使用 我已将IIS->Basic settings中的位置更改为正确的位置。 我的连接字符串是: LocalSQLSerer = data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true 我从asp.net获取此错误 [OleDbExcept

我将网站的位置更改为我的电子驱动器。 我们正在将PleskAsp.netcomp一起使用

我已将
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, DataTable dt, 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, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
        <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
        <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
          <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere" />
          <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
          <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, 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, Culture=neutral, 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, Version=1.0.61025.0, Culture=neutral, 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, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, 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, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, 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, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, 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>

(.*分类单元)-(.*)\.aspx\??(.*)
$1.aspx?t=$2$3
(.*税务员)-(.*)\.aspx\??(.*)
$1.aspx?l=$2$3
有人知道这里会有什么问题吗? 我主要使用WP页面和linux,这对我来说是希腊语。
这些是政府网站,因此高度重视反馈

您发布了一个SQL Server连接字符串和一个OLEDB异常,这显然是由于试图读取Access数据库文件而引发的。调试代码并发布实际抛出错误的代码。什么是
AppCache
BasePage
AppCache.InitCache
显然正在尝试加载
Webexpl.mdb
在我们移动服务器之前,它工作得很好。所以脚本“没什么”问题。更改文件的位置会导致此问题。您是否读取了异常文本或堆栈跟踪?这与SQL Server无关。该错误涉及
'C:\Inetpub\vhosts\domain.com\httpdocs\dir\App\u Data\WebExpl.mdb'
。此外,您发布的是SQL Server连接字符串,它不能与OLEDB一起使用