- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我使用 Microsoft.Web.Administration.ServerManager
类在 Windows 服务中管理网站。
我在我的代码中使用模拟,使用管理员用户,该用户有权修改我的 applicationHost.config
但是当我执行 .CommitChanges( );
。
有一个我的代码示例。
using (ServerManager svr = ServerManager.OpenRemote(args.IISName))
{
Site currentSite = svr.Sites.Where(item => item.Id == args.WebSite.Id).FirstOrDefault();
currentSite.Applications[0].VirtualDirectories[0].PhysicalPath = args.WebSite.PhysicalPath;
svr.CommitChanges();
}
我找到了 this solutions , 但我的 dcom 属性对象是锁
Unhandled exception has occured in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately. FileName \?\UNC[MY PATH]\applicationHost.config Error: Cannot write configuration file due to insufficient permissions
我的设置是 Windows 2008 R2、IIS 7.5、框架 3.5,我的 applicationHost.config 在 SAN 上
我可以尝试什么?
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.UnauthorizedAccessException: Filename: \\?\[MY PATH]\applicationHost.config
Error: Cannot write configuration file due to insufficient permissions
at Microsoft.Web.Administration.Interop.IAppHostWritableAdminManager.CommitChanges()
at Microsoft.Web.Administration.ConfigurationManager.CommitChanges()
at Microsoft.Web.Administration.ServerManager.CommitChanges()
at Nms.IIS.Business.Manager.IISManager70.UpdateWebSiteEntity(UpdateWebSiteEntityArgs args)
at Nms.IIS.Business.Service.IISService70.UpdateWebSiteEntity(UpdateWebSiteEntityArgs args)
at IISSwitcher.Form1.btnProccess_Click(Object sender, EventArgs e) in C:\Form1.cs:line 70
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4952 (win7RTMGDR.050727-4900)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
IISSwitcher
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file://[mypatch]/Altitude3%20Transfert/IISDirectorySwitch/IISSwitcher.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Nms.IIS.Business
Assembly Version: 1.0.295.8874
Win32 Version: 1.0.295.8874
CodeBase: file://[mypatch]/Altitude3%20Transfert/IISDirectorySwitch/Nms.IIS.Business.DLL
----------------------------------------
Nms.Core
Assembly Version: 1.0.1954.8874
Win32 Version: 1.0.1954.8874
CodeBase: file://[mypatch]/Altitude3%20Transfert/IISDirectorySwitch/Nms.Core.DLL
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.Practices.Unity
Assembly Version: 1.2.0.0
Win32 Version: 1.2.0.0
CodeBase: file://[mypatch]/Altitude3%20Transfert/IISDirectorySwitch/Microsoft.Practices.Unity.DLL
----------------------------------------
Microsoft.Practices.Unity.Interception
Assembly Version: 1.2.0.0
Win32 Version: 1.2.0.0
CodeBase: file://Microsoft.Practices.Unity.Interception.DLL
----------------------------------------
Microsoft.Practices.ObjectBuilder2
Assembly Version: 2.2.0.0
Win32 Version: 2.2.0.0
CodeBase: file://Microsoft.Practices.ObjectBuilder2.DLL
----------------------------------------
System.Core
Assembly Version: 3.5.0.0
Win32 Version: 3.5.30729.4926 built by: NetFXw7
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
Nms.Core.resources
Assembly Version: 1.0.1954.8874
Win32 Version: 1.0.1954.8874
CodeBase: file://Nms.Core.resources.DLL
----------------------------------------
Unity_ILEmit_InterfaceProxies
Assembly Version: 0.0.0.0
Win32 Version: 1.2.0.0
CodeBase: file://Microsoft.Practices.Unity.Interception.dll
----------------------------------------
Microsoft.Web.Administration
Assembly Version: 7.0.0.0
Win32 Version: 6.1.7600.16385
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.Web.Administration/7.0.0.0__31bf3856ad364e35/Microsoft.Web.Administration.dll
----------------------------------------
System.Runtime.Serialization
Assembly Version: 3.0.0.0
Win32 Version: 3.0.4506.4926 (NetFXw7.030729-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Serialization/3.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
最佳答案
在我们的例子中,服务器磁盘已满。我们添加了额外的磁盘空间,问题就解决了。
关于c# - 应用程序主机配置错误 : Cannot write configuration file due to insufficient permissions with IIS shared configuration,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5030991/
我正在执行 UPDATE .WRITE() 语句,并发现它显然只有在您像这样定义它时才有效: string sql = "UPDATE [dbo].[Table] SET [Column].WRITE
我在 Unix 系统上用 C 编程。我知道: write(fd,"ABCD",4); 比这样做更好: write(fd, "A", 1); write(fd, "B", 1); write(fd, "
func hash(s string) uint32 { h := fnv.New32a() h.Write([]byte(s)) return h.Sum32() } 对于这
在经典的 asp 页面中,有人告诉我您可以使用 vbscript 或 jscript。而 jscript 就是 javascript。 所以我不确定 Response.Write、Response.W
当 openssl 子进程尝试 write() 到本地目录时,我收到此错误。在调用 write() 之前连接已关闭。它没有与 ssl 连接,因为我什至无法从 nodejs 文档启动示例代码。 我错过了
最近我在试验netty。我遇到了以下问题: ctx.channel().write(new TextWebSocketFrame("hello")) 没有在客户端返回 hello,但是 ctx.cha
请解释以下内容: def feed(data): import os print "DATA LEN: %s" % len(data) f = open("copy", "w") f.
有什么区别debug.write 和 Trace.write ?每个应该什么时候使用? 最佳答案 在典型的发布构建配置中,Debug class 被禁用并且什么都不做。 Trace但是,仍然可以在发行
我只是想知道,就性能而言,哪个更好(我在 FileStream 中使用 StreamWriter): 多次调用 Stream.Write(): StreamWriter sw = new Stream
我发现自己写给 stringwriter,然后在函数末尾执行 resp.Write(sw.ToString())。这是不必要的吗?如果我多次使用 HttpResponse.Write,即使我的页面是
我正在尝试通过 JavaScript 文件从 electron 打开一个新窗口,它可以工作,并打开了新窗口,但我无法将 HTML/文本写入新文件。我收到那个错误: Cannot read proper
我们对 QIODevice::write 的一般行为和具体的 QTcpSocket 实现感到非常困惑。有一个 similar question已经,但答案并不令人满意。主要的混淆源于分别提到的 byt
我知道这听起来像是一个愚蠢的问题: write(*,*) 和 write(6,*) ?我在我研究所的 super 计算机上运行一个复杂的代码,它通过一个不同于 6 的单元号输出一个数据文件,显然编译的
我有一个结构体,它可以通过一系列复杂的方法调用转换为文本,其中包含大量 write!调用。此文本可以写入文件或调试日志。我正在决定是否使用 fmt::Write 或 io::Write .我不能真正使
已关闭。这个问题是 not reproducible or was caused by typos 。目前不接受答案。 这个问题是由拼写错误或无法再重现的问题引起的。虽然类似的问题可能是 on-top
In the C standard library, an output can't be followed by an input and vice versa. 对于Linux API,可以在re
我希望能够为一件事做 document.write。然后延迟半秒,然后再记录。写一些。你知道这是否可能吗?而且,如果是这样,怎么办?到目前为止,我已经尝试过了,但没有奏效: document.writ
为什么通过 onclick 属性调用的 write() 函数解析为 document.write() 并替换文档?有什么办法可以阻止这种情况发生吗? Write Function Alternat
我想创建一个包含多个“页面”的文本文件,并将每个页面的字节偏移量记录在一个单独的文件中。为此,我将字符串打印到主输出文件并使用 bytes_written += file.write(str) 计算字
关闭。这个问题需要更多focused .它目前不接受答案。 想改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭 8 年前。 Improve this qu
我是一名优秀的程序员,十分优秀!