DeploymentObjectProvider IIS extensibility - c#

I'm building a custom provider for MSDeploy and followed some examples:
http://sedodream.com/2012/06/07/ASPNETProvidersAndSQLAzure.aspx
http://blogs.iis.net/kateroh/archive/2009/06/19/msdeploy-custom-provider-to-execute-batch-files.aspx
But I can't get it to work somehow. I keep getting the following exception:
C:\Program Files\IIS\Microsoft Web Deploy V3>msdeploy -source:customFile=c:\test
\test.bat -verb=sync -dest:customFile=c:\test\test2.bat
Error Code: ERROR_PROVIDER_NOT_FOUND
More Information: The provider 'customFile' could not be found. Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_PROVIDER_NOT_FOUND.
Error count: 1.
Anyone got a working example for this?

Ok here's the answer:
http://blogs.iis.net/kateroh/archive/2009/06/19/msdeploy-custom-provider-to-execute-batch-files.aspx
I'm my case I had to add the files in: C:\Program Files\IIS\Microsoft Web Deploy V3\Extensibility

Related

I am trying to publish web application as a deployment package and while publish i'm getting the below error

I am trying to publish web application as using a deployment package and while publish I'm getting the below error. Tried with different ways to resolve like update the JSON reference and … etc.
DLL is available, but no luck
Error :
Severity Code Description Project File Line Suppression State
Error Copying file packages\Newtonsoft.Json.11.0.1\lib\portable-net40+sl5+win8+wp8+wpa81\Newtonsoft.Json.dll to C:\Users\abc\AppData\Local\Temp\WebSitePublish\xyzwebapplication-150487496\obj\Debug\Package\PackageTmp\packages\Newtonsoft.Json.11.0.1\lib\portable-net40+sl5+win8+wp8+wpa81\Newtonsoft.Json.dll failed. Could not find a part of the path 'packages\Newtonsoft.Json.11.0.1\lib\portable-net40+sl5+win8+wp8+wpa81\Newtonsoft.Json.dll'. xyzwebapplication 0
This Has been solved After I did remove the unwanted packages from the solution.
Remove packages and clean solution ,rebuild followed by publish.
Project-->Packages-->remove
The folders like "Json" etc..
It was success

ASP.NET Core 2.1 IIS hosting error 502.5 - Unable to execute dotnet command to determine cause

So I am getting the rather common HTTP Error 502.5 - Process Failure now that I've hosted my project on a server VM running Windows Server 2016. While troubleshooting, I've attempted most of the solutions proposed for the same error:
ASP.NET Core 1.0 on IIS error 502.5.
Nothing else helped, so I'm looking at the answer that received the most upvotes. This mentions running the following command to receive a more meaningful message describing the error:
C:\fullpath\dotnet C:\fullpath\PROJECT.dll
I am honestly not sure how to execute that. What I did was navigate to the published project's containing folder on the server through the cmd, and issue the command like so:
dotnet .\My_Project Integration.dll
But the console prints this in response:
No executable found matching command "dotnet-.\My_Project"
Notice how the DLL is titled 'My_Project Integration.dll, however the word 'Integration' is absent from the console response. I do not know whether the underscore is to blame here, but any help is appreciated getting the command to run.
And of course, if you know of a solution to the actual 502.5, that is welcome as well.
You've likely got this issue: https://github.com/aspnet/Home/issues/1931. The ASP.NET Core IIS Module reads the Web.config to determine what to execute to run the app.
You said running dotnet ".\My_Project Integration.dll" worked successfully and enabling stdout showed the same issue of the path being truncated after the space.
Two options:
Remove the space from your project (this would be the easiest option)
Update your Web.config
If you do #2, your Web.config needs to have something like this for the arguments attribute:
arguments='".\My_Project Integration.dll"'

CSC : error CS2001: Source file '.NETPortable,Version=v4.5,Profile=Profile78.AssemblyAttributes.cs' could not be found

When start build on my Bamboo server ,I am getting following error:
Using shared compilation with compiler from directory: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\Roslyn
CSC : error CS2001: Source file 'C:\Windows\system32\config\systemprofile\AppData\Local\Temp.NETPortable,Version=v4.5,Profile=Profile78.AssemblyAttributes.cs' could not be found. [E:\bamboo-agent-home\xml-data\build-dir\Domain\Domain.csproj]
Done Building Project "E:\bamboo-agent-home\xml-data\build-dir\Business\Business.csproj" (default targets) -- FAILED.
Unable to understand this error. On Local this works perfect even on command line - MSBuildcommand.
It looks like your build service is running as a system account (e.g. local system, network service, etc.) which leads to undesired behaviour in msbuild.
You should create a dedicated service user and configure the service to run as this user or ensure that the service user has sufficient rights to modify the system profile directory (which I don't recommend).
You can follow Atlassian's guide on how to run the windows service as a local user.

IIS 7.5 Tracing area "...." is not recognized - HTTP Error 500.0 - Internal Server Error

Everything was working fine and all of a sudden I started getting the following error for all my web projects and websites. One thing is for sure that this is IIS issue since the compiler is not even reach the code.
Error Message:
HTTP Error 500.0 - Internal Server Error
Tracing area "Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module,FastCGI,WebSocket,Rewrite,RequestRouting,iisnode" is not recognized
I've already tried following things one by one but no luck:
Re-install Tracing - 'Turn Windows features on or off',
Re-install IIS,
aspnet_regiis -i (also tried with -u),
Removed ISAPI .DLL
Windows Features:
I'm using Visual Studio 2013 to build a web project (asp.net C#).
I would really appreciate any help/information on this Issue.
I removed below tag from applicationhost.config file located under C:\Users\Sanket\My Documents\IISExpress\config path on windows 7 machine.
<add provider="WWW Server" areas="Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module,FastCGI,WebSocket,Rewrite,RequestRouting,iisnode" verbosity="Verbose" />
See if this helps.
From Richard Marr's Blog here, following solutions are listed and second solution worked for me.
Using Programs and Features find the Extension that is missing trace areas, right click select REPAIR.
Manually add the trace areas to the Applicationhost.config file as shown below. Remember to add in the "WWW Server" xml Node.
Sanket's suggestion works, but for me what was missing was
<add name="RequestRouting" value="2048" />
a few lines above in the applicationhost.config file, where all areas are defined. Adding this fixed it.
Btw. using VS2015 also fixes the problem without editing the .config file.
Do you have all modules listed in error message installed? You can download extensions here: (link for rewrite module) http://www.iis.net/downloads/microsoft/url-rewrite
To add to Sanket's solution:
In case you are not using IIS Express, in
C:\Inetpub\Wwwroot\Web.Config
Delete the line with:
"Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module,FastCGI,WebSocket,Rewrite,RequestRouting,iisnode" verbosity="Verbose"
In my case I was getting the error in IIS (NOT IIS express). I answered this question here:
https://stackoverflow.com/a/51717759/2817987

Compilation Error: [No relevant source lines]

I'm getting this error when trying to view a page in my localhost. Web site worked before. The code files are not pre-compiled. I've cleaned asp.net temporary folders and gave full control permission to IIS_IUSRS account for wwwroot and Temporary ASP.NET Files folder but no change.
I also get Access Denied error while try to execute
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe -i
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC2000: compiler initialization failed unexpectedly: 0x80070005
Source Error: [No relevant source lines]
Source File: vbc : Fatal Line: 0
Detailed Compiler Output:
c:\windows\system32\inetsrv> "C:\Windows\Microsoft.NET\Framework64\v3.5\vbc.exe" /t:library /utf8output /R:"C:\Windows\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\Windows\assembly\GAC_64\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Design\2.0.0.0__b03f5f7f11d50a3a\System.Design.dll" /R:"C:\Windows\assembly\GAC_64\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\Windows\assembly\GAC_64\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\edc6d145\6ccb6f45\assembly\dl3\5a446507\0042bc76_16cec701\Intelligencia.UrlRewriter.DLL" /R:"C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /out:"C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\edc6d145\6ccb6f45\App_SubCode_vb.8xqaf3z2.dll" /D:DEBUG=1 /debug+ /define:_MYTYPE=\"Web\" /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Specialized,System.Configuration,System.Text,System.Text.RegularExpressions,System.Web,System.Web.Caching,System.Web.SessionState,System.Web.Security,System.Web.Profile,System.Web.UI,System.Web.UI.WebControls,System.Web.UI.WebControls.WebParts,System.Web.UI.HtmlControls,System.Web.Configuration,System.Data,System.Data.OleDb,System.Globalization /warnaserror- /optionInfer+ "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\edc6d145\6ccb6f45\App_SubCode_vb.8xqaf3z2.0.vb" "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\edc6d145\6ccb6f45\App_SubCode_vb.8xqaf3z2.1.vb"
Microsoft (R) Visual Basic Compiler version 9.0.30729.715
Copyright (c) Microsoft Corporation. All rights reserved.
vbc : Fatal error BC2000 : compiler initialization failed unexpectedly: 0x80070005
First, try setting "Enable 32-bit Applications" to True for your website application pool if you are running on x64 machine.
If first option doesn't help, Grant Full Accesses for NETWORK SERVICE and IIS_IUSRS group on C:\Windows\Temp\ and C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\
This happened to me after repairing / upgrading my VS 2013 Express
I first tried adding "IIS_IUSRS" and "NETWORK SERVICE" with Modify to the following:
C:\Users\[username]\AppData\Local\Temp\Temporary ASP.NET Files
C:\local\path\to\NET_App
C:\Windows\Temp
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files
Those did not work. But then I removed the optimizeCompilations="true" from the compilation tag under system.web and everything worked great.
<compilation debug="true" targetFramework="4.5.1" batch="false" optimizeCompilations="false" />
I got the same error when i add .ascx and use it in .aspx, but src path was wrong, add:
tagPrefix="uc" src="~/Signup**d**/UserControls/CreditCheck.ascx" tagName="CreditCheck"
My solution was to Grant Full Accesses for NETWORK SERVICE user and Modify Rights for the IIS_IUSERS to your ASP.NET root application folder.
The issue was caused by web.config transformation. It needs to create a temp file in the root application folder.
The line zero behaviour is generally caused by compiling with optimizations turned on (eg inlining). Try unchecking "Optimize code" under your project's Properties - Build tab. Then Source Error will show the offending code with line numbers.
I faced same issue.
My Symptom: it was working find on local but was failing on dev/stage.
Reason I found: There was an appvariable used in aspx.cs (as following) which was missing in web.config
public static String myKey = ConfigurationManager.AppSettings["myKey"].ToString();
Reason it took long for me to figure out issue was, i was not expecting this type of error message on line 0 (may be because my developer defined this variable as static so it was throwing line 0 error)
We converted our webapps to 64 bit quite some time ago and I still see this error jumping between old solutions. However, suddenly none of the standard good answers found on this thread worked.
Here is what ended up fixing my case. In Visual Studio 2019 in the project properties, on the application tab, where you choose the framework, there is an option to "Install other frameworks..." It will link you to here https://dotnet.microsoft.com/en-us/download/visual-studio-sdks?cid=getdotnetsdk . I downloaded and reinstalled, by choosing the repair option, the .Net Framework 4.8.1 Developer Pack and all is well now.
The only possible explanation why mine went bad is a Windows Update, maybe.

Categories