2009-07-06 25 views
1

私はASP.NET(C#)上にいくつかのプリコンパイルされたコンポーネントを持つWebアプリケーションを持っています。私はまったく問題なくサポートしてきましたが、機能を追加して拡張しました。今私はリモートSOAPサービスを呼び出す必要がある別の拡張に直面しています。プリコンパイル済みのASP.NET Webサイトを変更するには? Visual Studioがそのサイトがプリコンパイルされていると文句を言います

私はここで得たいくつかの推奨事項に従ってそれをやってみました - Web Referenceを追加して、プロキシクラスとそのすべてを作成することで、アプリがプリコンパイルされているという文句を言います。

The directory '/trxv/App_WebReferences/' is not allowed because the application is precompiled. 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.Web.HttpException: The directory '/trxv/App_WebReferences/' is not allowed because the application is precompiled.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): The directory '/trxv/App_WebReferences/' is not allowed because the application is precompiled.]
System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +8805619
System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +128
System.Web.Compilation.BuildManager.CompileWebRefDirectory() +31 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +312

[HttpException (0x80004005): The directory '/trxv/App_WebReferences/' is not allowed because the application is precompiled.]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +58 System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +729

[HttpException (0x80004005): The directory '/trxv/App_WebReferences/' is not allowed because the application is precompiled.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8886319
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +259

Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

は、SOAPクライアントを呼び出し、任意の他の多かれ少なかれ、単純な(。すなわちハイレベル)の方法があり、再コンパイルが必要になりません。

ここでは、コンパイラの実際の出力はありますか?残念ながら、システムの元のソースコードは入手できません。

+0

もっと一般的な問題があると思います。プリコンパイルされたWebサイトを拡張する方法ですが、ソースはありません。これは単なるWebサービスの問題ではありません。 –

+0

これは、マスターテンプレートでプリコンパイルされ、使用されるコンポーネントがいくつか使用されていることです。私はそれらに触れていない。私はちょうどリモートソープコールを行う新しいフォームを使って新しいページを作成しています... HTTP接続を開いてXMLをサービスに直接伝えることができますが、.NETにはより良い/よりスマートにこれを達成する方法。 –

+0

質問を編集して、プリコンパイルされたサイトを変更できないようにすることをお勧めします。私はこの問題が実際にWebサービスに固有であるとは思わない。 Webサービス開発者よりも多くのASP.NET開発者がいると確信しています。最後に、MicrosoftがASMXを「従来のソフトウェア」とみなしているWCFについて考えてみましょう。 –

答えて

1

アレックス、

私の最新の編集にご注意ください。この問題は、あなたがWebアプリケーションを持っていないという事実と関係しています。あなたはWebサイトを持っています。彼らはユニークで奇妙です。

私はそうしなければ決して使用しないので、実際にこの例外は見たことがありません。しかし、それはむしろ最終的に見える。だからこれを修正する必要があります:

別のクラスライブラリプロジェクトを作成します。 Web参照をクラスライブラリに追加し、ビルドします。次に、Webページでクラスライブラリを参照できるかどうかを確認します。クラスライブラリにはプロキシクラスが含まれている必要があります。

+0

ジョン、それは素晴らしい考えです!どうもありがとう! 私はそれを行い、何が起こるかを見てください:) この質問を開いたままにしておきます。 –

関連する問題