For the past few days I'm trying to deploy my package to IIS 7 but I'm getting nowhere.
Whenever I try to publish the package I receive an error saying that the destination folder doesn't exist - but in fact it WAS created on the remote server but was empty (just the folder structure) :/
I'm building my package with a following command:
msbuild.exe /t:CreateWebPackages /toolsversion:4.0 CRM.msbuild
and trying to deploy it with:
CRM.cmd /M:server /Y
Result is:
C:\...WebService.deploy.cmd /M:crm-web /y
=========================================================
SetParameters from:
"C:...WebService.SetParameters.xml"
You can change IIS Application Name, Physical path, connectionString
or other deploy parameters in the above file.
-------------------------------------------------------
Start executing msdeploy.exe
-------------------------------------------------------
"C:\Program Files\IIS\Microsoft Web Deploy\\msdeploy.exe"
-source:package='C:...WebService.zip' -dest:auto,computerName='crm-w
eb-new',includeAcls='False' -verb:sync -disableLink:AppPoolExtension -disableLin
k:ContentExtension -disableLink:CertificateExtension
-setParamFile:"C:...WebService.SetParameters.xml"
Info: Adding sitemanifest (sitemanifest).
Info: Updating createApp (Kruk CRM Web Service/2.0.65000.65000).
Info: Adding contentPath (Kruk CRM Web Service/2.0.65000.65000).
Info: Adding dirPath (Kruk CRM Web Service/2.0.65000.65000).
Info: Adding child dirPath (Kruk CRM Web Service/2.0.65000.65000\bin).
Info: Adding setAcl (Kruk CRM Web Service/2.0.65000.65000).
Error: (2011-10-27 11:07:59) An error occurred when the request was processed on
the remote computer.
Error: Could not find file '\\?\C:\inetpub\wwwroot\CRM\2.0.65000.65000'.
Error count: 1.
But when i edit the SetParameters.xml file and change
<setParameter name="IIS Web Application Name" value="Web Service/2.0.65000.65000" />
to
<setParameter name="IIS Web Application Name" value="Web Service" />
it works!
So is there some magic trick that I need to do in order to create new dirs under the site ?
Found it! After experimenting with almost all of the available options of msbuild, msdeploy, project settings, IIS etc, I've noticed that msdeploy couldn't create my application under site's application pool because apparently it's identity had not high enough privileges to do so.
What did the trick was changing the identity of the site pool to Local System.
Related
Our organization has two separate collections
Application Development
Foobar Inc (Project)
Repo / Build pipeline (Pipeline)
External Applications (Collection)
External Applications (Project)
Artifacts
XYZ_SharedPackages (Nuget feed)
When I run the restore command for a project in Appliction Development for the Foobar Inc project I get
"C:\agent\_work\76\s\Foobar_Inc\Foobar_IncUI\Foobar_IncUI.csproj" (Restore target) (1) ->
(Restore target) ->
C:\Program Files\dotnet\sdk\6.0.200\NuGet.targets(130,5): error : Unable to load the service index for source
http://svp042iis/tfs/Application%20Development/_packaging/XYZ_SharedPackages/nuget/v3/index.json.
[C:\agent\_work\76\s\Foobar_Inc\Foobar_IncUI\Foobar_IncUI.csproj]
C:\Program Files\dotnet\sdk\6.0.200\NuGet.targets(130,5): error : Response status code does not indicate
success: 404 (Not Found - The feed with ID 'XYZ_SharedPackages' doesn't exist. (DevOps Activity ID: 5C76EC84-96B7-4125-BA30-296CF33B1754)).
[C:\agent\_work\76\s\Foobar_Inc\Foobar_IncUI\Foobar_IncUI.csproj]
The 404 error is coming from the source not existing, however I selected that feed by going into the restore command and selecting that option under feeds to use. My question is, does anyone know if it's possible to share across collections in dev ops.
If your two organziations are NOT in same AAD, you can follow below methods:
Method1:
You can use a NuGet authenticate task and a powershell task to run the nuget install command in the pipeline with the Feed URL of the target feed.
Create a Nuget Service connection to the target organization.
Target feed URL:https://pkgs.dev.azure.com/{orgname}/_packaging/{feedname}/nuget/v3/index.json, The password is PAT.
2.Add NuGet authenticate task before your restore.
Use the powershell task in line script.The in line script :
nuget install {package name} -version {package version} -Source https://pkgs.dev.azure.com/{orgname}/_packaging/{feedname}/nuget/v3/index.json.
It will restore the package successfully.
Method 2:
Directly use a powershell task with inline script:
nuget install {package name} -version {package version} -Source https://pkgs.dev.azure.com/{orgname}/_packaging/{feedname}/nuget/v3/index.json.
The two Environment Variables needs to be set:
• NUGET_CREDENTIALPROVIDER_SESSIONTOKENCACHE_ENABLED=true
• VSS_NUGET_EXTERNAL_FEED_ENDPOINTS= {"endpointCredentials": [{"endpoint":"https://pkgs.dev.azure.com/{orgname}/_packaging/{feedname}/nuget/v3/index.json", "username":"optional", "password":"$(PAT)"}]}
If your two organizations are in same AAD, you can follow below steps:
Please check the permissions in Feed Settings -> Views. Then change the access permissions for Local view in more options-> edit, choose “All feeds and people in organizations associated with my Azure Active.
Setup upstream resource :
On the upstream feed, add project collection build service account as contributor or collab or owner role.
I'm trying to write an app based on my iTunes Library. I don't have any problem in dev environnement (iis or dev srver). But in prod i've got this error
Retrieving the COM class factory for component with CLSID
{DC0C2640-1415-4644-875C-6F4D769839BA} failed due to the following
error: 80080005 Échec de l’exécution du serveur (Exception from
HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).
Of course i'm searching and searching......
i've tryed all solution founded :
i've got full right for this acount :
Local service
Network service
User
IIS_IUSR
on this file :
iTunes.exe
on this folder :
App/iTunes
Music/iTunes
wwwroot
sysWOW64...Desktop
And also on dcomcnfg :
MyComputer/SecurityCOM on acces activate and exec
DCOM configuration/iTunes on acces activate exec and config
i've put in my webconfig
<authentication mode="Windows"/>
<identity impersonate="true"/>
AppPool is on pipeline classic and i'm trying with all identity and also with 32b support enabled
..... No result
i become crazy with security stuff...
anyone have some ideas...?
thank a lot
After trying multiple configuration changes, I cannot seem to get past this error. This is a fresh install of Windows Server 2012R2, with all of the options selected under the ASP.NET/IIS modules and features selected. I'm using Visual Studio 2013, and the target framework is 4.5
I have also executed the following commands:
%windir%\system32\inetsrv\appcmd.exe unlock config -section:system.webServer/handlers
%windir%\system32\inetsrv\appcmd.exe unlock config -section:system.webServer/security/ipSecurity
%windir%\system32\inetsrv\appcmd.exe unlock config -section:system.webServer/modules
Try adding
-commit:apphost
to the command, like this
%windir%\system32\inetsrv\appcmd.exe unlock config section:system.webServer/security/ipSecurity -commit:apphost
so that the unlocking is applied at the topmost (applicationhost.config) level instead of the lower web.config levels
OK so we have something that is currently using OpenExeConfiguration for reading a config file, however this doesn't work when running in the web context.
I've tried a variety of different ways of opening the web.config programmatically but I can't seem to get it to read the correct web.config file. In case it matters I am currently debugging it in VS 2008.
1. config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(System.Web.HttpContext.Current.Request.ApplicationPath);
2. config = ConfigurationManager.OpenMappedExeConfiguration(new ExeConfigurationFileMap { ExeConfigFilename = "web.config" }, ConfigurationUserLevel.None);
3. config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~");
4. config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(null);
5. System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(System.Web.Hosting.HostingEnvironment.ApplicationVirtualPath);
It either opens up the wrong config file (either the machine config, or the VS /IDE/Web.config) or complains about the error:
{System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Failed to map the path '/'. ---> System.InvalidOperationException: Failed to map the path '/'.
Edit -
OK so a combination of
config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~");
AND running Visual Studio 2008 As Administrator worked. Am hoping we don't run into security/permission issues when we deploy to our web server / client environments!
So in the end I used this code (had to handle whether the web application was running, or if our unit test code was running).
System.Configuration.Configuration config = null;
if (System.Web.HttpContext.Current != null && !System.Web.HttpContext.Current.Request.PhysicalPath.Equals(string.Empty))
config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~");
else
config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
Also have to be running Visual Studio in Administrator mode - which I found out you can set as a property on your shortcut so you don't need to remember each time in Windows 7 to right click and run as administrator :)
I am using the following MSDeploy command to pull content and settings from a production server to a staging server nightly.
msdeploy -verb:sync -source:webServer,wmsvc=xx.xx.xx.xx,username=xxxxx,password=xxxxxx,authType=basic -allowUntrusted=true -dest:webServer
As documented here the "webServer" provider uses several other providers. Is there any way to exclude the "machineConfig32" and "machineConfig64" linked providers from being executed?
Thanks.
Updated:
Using a manifest works:
<sitemanifest>
<appHostConfig path="siteNameHere" />
<appHostSchema />
<contentPath path="siteNameHere" />
<rootWebConfig32 />
<rootWebConfig64 />
</sitemanifest>
with MSDeploy command:
msdeploy" -verb:sync -source:manifest=d:\msdeploy\deploymanifest.xml,wmsvc=xx.xx.xx.xx,username=xxxxxx,password=xxxxxx,authType=basic -allowUntrusted=true -dest:manifest=d:\msdeploy\deploymanifest.xml
You can just skip those objects from the sync operation all together by adding the following to your command line: -skip:objectName=machineconfig32 -skip:objectName=machineConfig64
The linked extensions you can exclude are covered here and here:
I don't see yours listed there, but it may be worth a try. Sometimes this doco is out of date.
That said, you may want to try to "build up" less inclusive providers using manifests rather than "tearing down" an all-inclusive one. Try the following link for the info.. (package manifests)
Then you can have a package command like: (my IIS6 standard package command, note this won't work exactly as it's IIS6, just serving up an example)
-verb:sync -source:manifest=$manifestFile -dest:package=$appName.zip,encryptPassword=MyPassword -enableLink:AppPoolExtension -disableLink:CertificateExtension -disableLink:ContentExtension -declareParamFile:$parametersFile"
and deploy:
-verb:sync -source:package=$appname.zip,encryptPassword=MyPassword -dest:auto -setParamFile=$appname_$computernamesetParameters.xml
In the manifest I then have the site, the content directory, a registry location I need, and even com components and the like.
As far as I know - there is no direct way to exclude linked providers. However - you can sync individual providers by getting the dependency list.