私はASP.NET(C#)上にいくつかのプリコンパイルされたコンポーネントを持つWebアプリケーションを持っています。私はまったく問題なくサポートしてきましたが、機能を追加して拡張しました。今私はリモートSOAPサービスを呼び出す必要がある別の拡張に直面しています。プリコンパイル済みのASP.NET Webサイトを変更するには? Visual Studioがそのサイトがプリコンパイルされていると文句を言います
私はここで得たいくつかの推奨事項に従ってそれをやってみました - Web Referenceを追加して、プロキシクラスとそのすべてを作成することで、アプリがプリコンパイルされているという文句を言います。
は、SOAPクライアントを呼び出し、任意の他の多かれ少なかれ、単純な(。すなわちハイレベル)の方法があり、再コンパイルが必要になりません。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) +259Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053
ここでは、コンパイラの実際の出力はありますか?残念ながら、システムの元のソースコードは入手できません。
もっと一般的な問題があると思います。プリコンパイルされたWebサイトを拡張する方法ですが、ソースはありません。これは単なるWebサービスの問題ではありません。 –
これは、マスターテンプレートでプリコンパイルされ、使用されるコンポーネントがいくつか使用されていることです。私はそれらに触れていない。私はちょうどリモートソープコールを行う新しいフォームを使って新しいページを作成しています... HTTP接続を開いてXMLをサービスに直接伝えることができますが、.NETにはより良い/よりスマートにこれを達成する方法。 –
質問を編集して、プリコンパイルされたサイトを変更できないようにすることをお勧めします。私はこの問題が実際にWebサービスに固有であるとは思わない。 Webサービス開発者よりも多くのASP.NET開発者がいると確信しています。最後に、MicrosoftがASMXを「従来のソフトウェア」とみなしているWCFについて考えてみましょう。 –