【问题标题】:C# application deployment on a network share folder网络共享文件夹上的 C# 应用程序部署
【发布时间】:2013-08-16 05:15:34
【问题描述】:

我开发了一个 c# 应用程序并使用 sql server 2008 r2 作为数据库。现在我要做的是将这个应用程序和 SQL Server 2008 安装在 PC1 的共享文件夹中,然后从 PC2 访问这个应用程序。但在 PC1 中使用相同的单个数据库。 (当数据从PC2插入c#应用程序时,数据保存在PC1的数据库中。)

这是一个用户信息处理系统。此应用程序还提供收据打印选项。 PC1 和 PC2 都通过 LAN 连接。

谁能告诉我怎么做。 从“创建设置文件”到将其部署到共享文件夹。 (如果不是 Windows 安装程序策略)

【问题讨论】:

    标签: c# sql-server-2008-r2 setup-deployment


    【解决方案1】:
    If you want to install the application in the shared folder, you need to think about Code Access Security. By default, the .net execute will not run from shared folders. 
    Refer the below links.
    http://msdn.microsoft.com/en-us/library/930b76w0(v=vs.90).aspx
    http://blogs.msdn.com/shawnfa/archive/2004/12/30/344554.aspx
    http://blogs.msdn.com/shawnfa/archive/2005/07/27/443975.aspx
    
    The .NET Framework comes with a utility called CasPol.exe that can be used to tweak trust policies that result in the above-mentioned security exceptions.
    
    The primary command line towards achieving this is -
    
    CasPol.exe -m -ag 1.2 -url file://Network_PC_Name/Share_Name/* FullTrust
    
    
    First install the application in PC1 as usual, access it from the shared folder from PC2.
    You need to use normal / default windows setup to create the deployment option.
    
    http://www.c-sharpcorner.com/UploadFile/rahul4_saxena/Setup08232007071849AM/Setup.aspx
    
    Please let me know, if you need further information.
    
    Hope this helps you.
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-07
      • 1970-01-01
      • 2013-09-05
      • 2019-04-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多