2013-08-16 104 views
0

我開發了一個c#應用程序並使用sql server 2008 r2作爲數據庫。現在我想要做的就是將此應用程序和SQL Server 2008安裝到PC1的共享文件夾中,並從PC2訪問此應用程序。但在PC1中使用相同的單個數據庫。 (當數據從PC2插入到c#應用程序時,數據保存在PC1的數據庫中。)C#應用程序部署在網絡共享文件夾中

這是一個用戶信息處理系統。收據打印選項也可在此應用程序中使用。 PC1和PC2都通過LAN連接。

有人可以告訴我該怎麼做。 從「創建設置文件」到將其部署到共享文件夾。 (如果它不是windows安裝策略)

回答

0
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. 
相關問題