【发布时间】:2011-04-13 06:56:30
【问题描述】:
我编写了一个 Web 服务应用程序,其中我创建了一个 INI 文件以保存所需的所有服务器 URL,但是每当我要访问 INI 文件时我都无法访问该 INI 文件它会显示给我这个错误,
System.IO.FileNotFoundException: Could not find file 'c:\windows\system32\inetsrv\default.ini'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
at System.IO.StreamReader..ctor(String path)
at DARDMeatInspection.services.QABMeatInspectionService.ReadINI() in D:\DARD\trunk\server\DARDMeatInspection\DARDMeatInspection\services\QABMeatInspectionService.asmx.cs:line 116
at DARDMeatInspection.services.QABMeatInspectionService.GetAllClassifiers() in D:\DARD\trunk\server\DARDMeatInspection\DARDMeatInspection\services\QABMeatInspectionService.asmx.cs:line 27
另外,部署后是否可以更改 INI 文件的内容? 如果我错了,请纠正我。任何帮助将不胜感激。
【问题讨论】:
标签: asp.net web-services ini