For a BizTalk project, where does Studio stores the deployment details? I opened the dtproj and csproj files in notepad, but found relative entries which store the deployment details (like application name, Db name etc).
The servername and managementdatabase name are stored in the ".btproj.user" file.
<VisualStudioProject>
<BIZTALK>
<Build>
<Settings>
<Config
Name = "Development"
RestartHostInstances = "False"
Register = "True"
Redeploy = "True"
ConfigurationDatabase = "BizTalkMgmtDb"
Server = "MYSERVER"
/>
The applicationname are stored in the ".btproj" file
<VisualStudioProject>
<BIZTALK>
<Build>
<Settings>
<Config
ApplicationName = "MyBTSApp"
/>
The reason for having database and server config in the '.btproj.user' (which normally is not under source control) is that the Visual Studio deployment feature main focus is for development scenarios where one users settings might differ from another.
It basically exports its "c:\documents and settings[user]\Application Data\Microsoft\Deployment\BindingFiles" or somewhere around there.
Right click on the project and browse it's property sheets. You'll find the necessary entries. Now keep in mind, this is only for deployment from the dev studio. You want to change control your binding files like source code in your deployment packages.
Related
The question is a follow up to this one: Generate Web.Debug config which could be debugged](Generate Web.Debug.config which could be debugged)
I have defined a transformation for web.debug.config. During compilation I see the following:
Transformed Web.config using C:\data\Main\WebRole\Web.Debug.config into
C:\data\Main\obj\obj\x64\Debug\WebRole.csproj\TransformWebConfig\ [...]
transformed\Web.config.
Checked Web.config in the specified location - it is correct (transformation succeeded)
But when I start the service in the azure emulator I get an alert that
Why does it happen? Looks that incorrect web.config is taken. Where should I specify the location of correct (transformed) file?
The key thing to realise with web.config Transforms (and is mentioned in the answer to your linked question) is that they are only part of the story.
When you build your sources, the transformed web.config file is built into the /obj/ folder, ready for deployment.
It is only the act of deploying your solution somewhere that puts the transformed config file into use - as noted in the docs:
When you deploy the Web application by using the selected build configuration and by using either a deployment package or one-click publish, the Web.config file is transformed according to your specifications.
How are you running the application after you build it? You need to publish or deploy it using one of the built in mechanisms that support web transforms to see those changes on your site.
If you are running the emulator against the original source files, they won't see the transformed web.config file - which is why typically the debug build doesn't have any transforms and you then turn off debugging with your Release build which is then deployed to production.
As you're trying to test this in the emulator you should be able to do the following:
In the Solution Explorer, ensure you've selected a file within the project that runs in the emulator.
From the Build menu, select "Publish [Project Name".
In the Publish Wizard, create a new "Profile" using the "Custom" publish target.
In the "Connection" pane select "File System" as the publish method, and give it a suitable target location.
In the "Settings" pane choose the appropriate configuration (in your case probably "Debug"), and set any other options that you'd like.
Then press "Publish", and the project should be built, and then deployed to the new file location.
You should then be able to start the emulator from this newly published location, which will be using your transformed web.config.
I have found this solution and it works perfectly
https://translate.google.co.il/translate?hl=en&sl=de&tl=en&u=http%3A%2F%2Fwww.sascha-dittmann.de%2Fpost%2FWebConfig-Transformation-im-Windows-Azure-Compute-Emulator.aspx&anno=2
I just installed VS 2013, upgrading from VS 2010. Creating a web deployment package zip file used to work in 2010. using VS 2013's Publish Web feature to publish to a Web Deploy Package, I getting the following error:
Web deployment task failed. (Object of type 'manifest' and path
'D:\dev\DMWeb\DMWebClient\obj\Test\Package\DMWebClient.SourceManifest.xml'
cannot be created. Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEPTION_WHILE_CREATING_OBJECT.)
The details in the Web Publish Activity tab shows the following:
Transformed Web.config using D:\dev\DMWeb\DMWebClient\Web.Test.config
into obj\Test\TransformWebConfig\transformed\Web.config.
Auto ConnectionString Transformed Views\Web.config into
obj\Test\CSAutoParameterize\transformed\Views\Web.config.
Auto ConnectionString Transformed obj\Test\TransformWebConfig\transformed\Web.config into
obj\Test\CSAutoParameterize\transformed\Web.config.
Copying all files to temporary location below for package/publish: obj\Test\Package\PackageTmp.
Packaging into D:\dev\DMWeb\DMWebClient\obj\Test\Package\DMWebClient.zip.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(3883,5):
Error ERROR_EXCEPTION_WHILE_CREATING_OBJECT: Web deployment task failed. (Object of type 'manifest' and path
'D:\dev\DMWeb\DMWebClient\obj\Test\Package\DMWebClient.SourceManifest.xml' cannot be created.
Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEPTION_WHILE_CREATING_OBJECT.)
Package failed.
In VS 2010, I've had to run it as Administrator for deploy to work, and I'm doing so here as well. I've also tried giving Full Control permissions to the project folder to NETWORK SERVICE, LOCAL SERVICE, Authenticated Users, and myself.
In the Package folder, there is the PackageTmp folder (which looks good), and the DMWebClient.SourceManifest.xml file, and that's it. In VS 2010, there's more files there.
DMWebClient.SourceManifest.xml contains:
<?xml version="1.0" encoding="utf-8"?>
<sitemanifest>
<IisApp path="D:\dev\DMWeb\DMWebClient\obj\Test\Package\PackageTmp" />
<setAcl path="D:\dev\DMWeb\DMWebClient\obj\Test\Package\PackageTmp" setAclResourceType="Directory" />
<setAcl path="D:\dev\DMWeb\DMWebClient\obj\Test\Package\PackageTmp" setAclUser="anonymousAuthenticationUser" setAclResourceType="Directory" />
<setAcl path="D:\dev\DMWeb\DMWebClient\obj\Test\Package\PackageTmp\App_Data" setAclResourceType="Directory" setAclAccess="Write" />
<setAcl path="D:\dev\DMWeb\DMWebClient\obj\Test\Package\PackageTmp/DMWeb.config" setAclResourceType="File" setAclAccess="Read,Write" />
</sitemanifest>
In VS 2010, the last line containing DMWeb.config doesn't exist. On top of that, the path to it is wrong. It should be under the App_Data folder.
DMWeb.config is specified in Web.config like this:
<appSettings file="DMWeb.config">
Any help would be greatly appreciated.
This can also happen if there are any files in your project that have been moved, deleted, or renamed from the file system such that Visual Studio doesn't know where to find them.
My error was allmost identical:
C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets
(3883): Web deployment task failed. (Object of type 'manifest' and
path
'D:\B\280\Binaries_PublishedWebsites\ProjectName\ProjectName.SourceManifest.xml'
cannot be created. Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEPTION_WHILE_CREATING_OBJECT.)
The reason I found out is in the ProjectName.SourceManifest.xml file.
There is a line: <appHostConfig path="Default Web Site/ProjectName" />
If this webapp and site does NOT exist on the buildmachine, the error occurs. Once I created a dummy webapp site with the same name on the same site, it built!
And solved by removing that section with MsBuild parameters: /p:IncludeIisSettings=false /p:IncludeAppPool=false (i had those 2 to true, so only applies when you have them true)
Found out that I had an old .wpp.targets file from VS 2010, it was called ~DMWebClient.wpp.targets. In VS 2010, by renaming it, it would ignore it and not apply it. It seems like VS 2013 applies any .wpp.targets files regardless of the file name.
By removing that file, web deploy works again.
Thought I would add as none of the other answers fixed my problem, though perhaps more related to Lightswitch Web Deploy than ASP.NET Web Deploy (though OP doesn't specify which).
There are three projects within a standard Lightswitch Template solution. Two of them might be named lightswitchapp.HTMLClient and lightswitchapp.Server. Neither of these should be deployed! You should deploy the third project lightswitchapp.
I had been getting errors like this, which led me to this page.
Web deployment task failed. (Object of type 'manifest' and path 'manifest xml hidden' cannot be created. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEPTION_WHILE_CREATING_OBJECT.)
Great answer above, regarding the Lightswitch Web Deploy...couldn't find anything about it anywhere...kept thinking MS broke this on purpose because they don't want to support LightSwitch anymore...
In any case, once you go through the steps on publishing the main project from the LightSwitch template, a new problem arises, regarding the publish params if you push to a local IIS.
For all of you struggling with that...first install
httpPlatformHandler_amd64.msi
WebDeploy_amd64_en-US.msi
then, make sure "Web Deployment Agent Service" is running as a service
then, in Visual Studio (I am on VS2015 community), on the Publish Settings tab in the wizard, make sure you have something like this:
Service URL:
http://localhost/MSDEPLOYAGENTSERVICE
Site/Application:
Default Web Site\trax01
where trax01 is the name of your web app that runs under Default Web Site (please notice the back-slash before "trax01" compared to the forward-slash in the label for the setting.
Hope it helps somebody else, because this thing ate my liver! :)
The same exception can still happen in Visual Studio 2019. Additional detail for me was Object of type 'manifest' and path 'manifest xml hidden' cannot be created.
In my case the problem was a MsDeployDeclareParameters item in the {ProjectName}.wpp.targets file. It was attempting to set ACL permissions for the downloads folder, but the folder didn't contain any files so it wasn't present in the staging area.
Adding a file to the downloads folder resolved the problem (as would removing the MsDeployDeclareParameters entry from the {ProjectName}.wpp.targets file).
I tried many Solution by updating security to TLS 1.2 (X)
Removed * or special character from variables and password.
But later I found that, we have * in the password of connectionString in web.config.
I changed my password and it started working for me.
I have a three tier web app that produces three separate dlls:
Web.UI.dll
Web.Application.dll
Web.DAL.dll
Both Web.Application.dll and Web.DAL.dll have their own app.configs. I need to access a specific setting that lives in web.config. I am using the following code:
[CacheUtil.cs]
string cacheName = ConfigurationManager.AppSettings.Get("CacheName");
I have verified that this setting exists. So, why then, when I run am I getting NULL? Does CacheName need to exist in all of .config files?
Here is the setting in web.config:
<appSettings>
<add key="CacheName" value="staging"/>
FYI, CacheUtil is a singleton that is lazy initialized upon first access. First access is happening in the DAL.dll project.
Thanks!
Only web.config is being read. The other config files (Web.Application.dll.config and Web.DAL.config) are not read.
Config is not attached to libraries; only to the ultimate executable being run (the AppName.exe.config or web.config)
Projects in Visual Studio that produce an EXE can have an app.config file, and this file is treated specially upon build; It is renamed to ProgramName.exe.config and copied to the output directory. app.config in class library or Web application projects will have no effect.
Try this:
cachename = ConfigurationManager.AppSettings["CacheName"];
This is provided that you are trying to read AppSettings out of the project's app.config file. You can't read config from another project unless you use some other logic, but it wouldn't be through the ConfigurationManager class. It'd have to be normal I/O.
I am very much new to the Continous Integration. Could anyone please let me know whether we could build a website using MSbuild?
You can build a Web Site project using the AspNetCompiler MSBuild task.
http://msdn.microsoft.com/en-us/library/ms164291.aspx
Your MSBuild file might look something like this:
<Project
xmlns = "http://schemas.microsoft.com/developer/msbuild/2003"
DefaultTargets = "PrecompileWeb">
<Target Name = "PrecompileWeb">
<AspNetCompiler
VirtualPath = "DeployTemp"
PhysicalPath = "C:\ccnet\myProject\WebSite"
TargetPath = "C:\ccnet\myProject\PreCompiled"
Force = "true"
Debug = "true"
Updateable = "true"/>
</Target>
</Project>
And then within your ccnet.config, you would add something like the following in the tasks block for your project:
<msbuild>
<executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
<workingDirectory>C:\ccnet\myProject\</workingDirectory>
<projectFile>C:\ccnet\myProject\myproject.msbuild</projectFile>
<logger>C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
</msbuild>
If you have an SLN file for the Web Site, then you can use the following command:
msbuild YourSolutionFile.sln
Yes, you can - even with a "website".
What you need to do is add the "Web Deployment Project" and set it up so it will grab all the files from the website, compile them, and using something like WiX, you can create an installer for the files to be able to easily deploy your web site and all its files needed to a customer's computer.
Marc
unfortunately, if you have chosen "Website" as the project type you cant. However, if you chose "Web Application" project type, you can use MSBUILD to build it. Once you have created the "web application" project, you can right click on it and select "Add Web Deployment Project" which will add a wdproj file to your solution and you can customize the settings in there.
You can provide this wdproj file to your ccnet config file for the project which can run this as per the schedule configured. i can probably give you teh appropriate nodes required to configure in cc.net config file by tomorrow once i am in the office
I have a WPF application in VS 2008 with some web service references. For varying reasons (max message size, authentication methods) I need to manually define a number of settings in the WPF client's app.config for the service bindings.
Unfortunately, this means that when I update the service references in the project we end up with a mess - multiple bindings and endpoints. Visual Studio creates new bindings and endpoints with a numeric suffix (ie "Service1" as a duplicate of "Service"), resulting in an invalid configuration as there may only be a single binding per service reference in a project.
This is easy to duplicate - just create a simple "Hello World" ASP.Net web service and WPF application in a solution, change the maxBufferSize and maxReceivedMessageSize in the app.config binding and then update the service reference.
At the moment we are working around this by simply undoing checkout on the app.config after updating the references but I can't help but think there must be a better way!
Also, the settings we need to manually change are:
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Ntlm" />
</security>
and:
<binding maxBufferSize="655360" maxReceivedMessageSize="655360" />
We use a service factory class so if these settings are somehow able to be set programmatically that would work, although the properties don't seem to be exposed.
Create a .Bat file which uses svcutil, for proxygeneration, that has the settings that is right for your project. It's fairly easy. Clicking on the batfile, to generate new proxyfiles whenever the interface have been changed is easy.
The batch can then later be used in automated builds. Then you only need to set up the app.config (or web.config) once. We generally separate the different configs for different environments, such as dev, test prod.
Example (watch out for linebreaks):
REM generate meta data
call "SVCUTIL.EXE" /t:metadata "MyProject.dll" /reference:"MyReference.dll"
REM making sure the file is writable
attrib -r "MyServiceProxy.cs"
REM create new proxy file
call "SVCUTIL.EXE" /t:code *.wsdl *.xsd /serializable /serializer:Auto /collectionType:System.Collections.Generic.List`1 /out:"MyServiceProxy.cs" /namespace:*,MY.Name.Space /reference:"MyReference.dll"
:)
//W
Rather than changing the generated endpoint, uou could add a second endpoint and binding definition with the configuration you need, then in your code just put the name of the new endpoint in your service client constructor.
Somehow I prefer using svcutil.exe directly than to use the "Add Service Reference" feature of Visual Studio :P This is what we're doing on our WCF projects.
I take your point, svcutil is definetly the more advanced way of adding and updating service references. Its just a fair bit more manual work when "right click, update reference" is so close to just working in a single step.
I guess we could create some batch files or something to just output the reference code. Even then, manually checking out and updating the service code with svcutil will probably be more work than just undoing the check out on the config.
Thanks for the advice in any case.
What we do is we check out (from source control) the app.config and *.cs files that are autogenerated by the svcutil.exe utility, then we run a batch file that runs svcutil.exe to retrieve the service metadata. When it's done, we recompile the code, make sure it works, then check the updated app.config and *.cs files back in. It's a whole lot more reliable than using the oft-buggy "Add Service Reference" with Visual Studio.