2010-10-27 94 views
2

我有一個與Web應用程序有點混亂。我在開發環境中工作,現在我試圖將它發佈到另一個仍在我自己的計算機上的文件夾,所以我的一個同事可以嘗試一下,而不必打擾我。於是我去了「Visual Studio」中的「發佈」,創建了一個新的「Web應用程序」,然後我在那裏發佈了應用程序。ASP.NET應用程序部署混亂

但是,應用程序無法正常工作:

Could not load file or assembly 'DkWP2' or one of its dependencies. The system cannot find the file specified. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'DkWP2' or one of its dependencies. The system cannot find the file specified. 

我給看看文件夾結構和文件都是存在的,但它是尷尬一點點:

C:\inetpub\wwwroot\DkWP2App>tree /f 
Folder PATH listing 
Volume serial number is 68B7-8AE3 
C:. 
│ AppConfig.xml 
│ LogoMini.png 
│ DkPService.svc 
│ Web.config 
│ 
├───App_Data 
├───bin 
│ │ AppConfig.xml 
│ │ DkWP2.dll 
│ │ DkWP2.pdb 
│ │ DkWP2.XmlSerializers.dll 
│ │ 
│ ├───css 
│ │ └───GSA1 
│ │  │ jquery-ui-1.8.5.custom.css 
│ │  │ 
│ │  └───Images 
│ │    [jQueryUi Pictures] 
│ │ 
│ ├───Images 
│ │  [Some of the Main pictures] 
│ │ 
│ └───x86 
│  └───Debug 
│    AppConfig.xml 
│    DkWP2.dll 
│    DkWP2.pdb 
│ 
├───css 
│ │ [MainCss Files] 
│ │ 
│ ├───Base 
│ │  [Base Css Files] 
│ │ 
│ └───GSA1 
│  │ jquery-ui-1.8.5.custom.css 
│  │ 
│  └───Images 
│   [jQueryUi Pictures] 
│ 
├───Images 
│  [Main pictures] 
│ 
├───JavaScript 
│  [JS Files] 
│ 
├───Web 
└───Web References 
  • ./bin./bin/x86/Debug中的.dll文件具有不同的 大小。
  • 我試過複製.dll 文件到./但它仍然沒有 工作。
  • 該文件夾css出現在././bin中,但與 的內容不同。

ASP.NET在哪裏試圖找到.dll文件?

如果我在發佈時選擇「發佈」,爲什麼要有./bin/x86/Debug

親切的問候。

+0

+1爲偉大的插圖 – Aliostad 2010-10-27 11:36:02

回答

1

當您下次發佈時,打開輸出窗口設置爲生成輸出。這將充滿Visual Studio輸出的指示,向您顯示它正在執行的所有操作。當我缺少DLL引用時,我在那裏發現了Visual Studio試圖找到缺少的文件的語句。它注意到它查找文件的所有地方。