Not able check in web.config in TFS 2012 - web-config

We have issue with web.config files in all our web projects.
I can check out, modify and check in any other files, accept web.config - we have to bypass build during check in process for our web.config files. Error return by TFS build: Exception Message: Access to the path 'C:\Builds\2\89\Sources\..\WebProjectName\Web.config' is denied. (type UnauthorizedAccessException)
I check permission - no issue there.
please advice?

Make sure no other applications/services are reading that file. Maybe IIS, notepad or some other app has a lock on the file?

Related

Blazer Server App - Add web.config settings

I have a Blazor Server app that is running under IIS. I see that it generates a web.config file upon publish with some settings in it.
I need to add some more settings to the web.config as they are used by another component (asp.net 4 app). Does anyone know which file I need to create/modify in order to be able to add these values.
At this stage I do not need to use transforms on the web.config, but it would be nice to know this as well.
What I found is that the web.config works as per Asp.Net Core documentation. In brief for a Blazor server app hosted under IIS (this is my understanding)
If there is no web.config existing in the root of the project directory, one is created during the build and copied to the bin directory. It will contain default information.
If a web.config exists in the root of the project directory, it is copied to the bin folder unmodified (note: it requires some default settings inside).
If transforms exist, they will be applied.
I didn't realise that the web.config is created if it did not exist hence my original question.
Also, I have not been able to get transforms to work yet.
I found that if you publish the project the web.config in the root gets ignored and uses the auto-generated one.
Adding this to my blazor project file solved it and can see the web.config getting published to Azure now:
<PropertyGroup>
<PublishIISAssets>true</PublishIISAssets>

Cant import a module due to "Import-Module : Could not load file or assembly" however the file is present [duplicate]

When I run CodedUI Test from a small Console tool via vstest.console.exe from a scheduled task I sometimes see this error message on different PCs:
error : Could not load file or assembly 'file:///C:\foobar.dll' or
one of its dependencies. Operation is not supported. (Exception from
HRESULT: 0x80131515)
Why/what is this not supported?
Right click on the Dll and unblock it.
During my research I found that this may happen when you downloaded a test in a ZIP from the internet and the advice was to unblock the ZIP. But I copied the files over the network from my developer system to the test PCs and the files were not blocked.
Searching more for the error code 0x80131515 I found this answer in the MSDN forum.
So I edited the file
C:\Program Files (x86)\Microsoft Visual Studio
11.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe.config
and added the entry <loadFromRemoteSources enabled="true" /> under the runtime tag and voilá, the tests run fine without any issues from a scheduled task.
Maybe this helps other users who also run into this strange issue.
As previously stated, a Zip file is blocked when downloaded from an untrusted site. If you are confident the site is reliable you can prevent this behavior by adding it to your trusted sites list in Internet Explorer -> Tools Menu -> Internet Options -> Security Tab -> Trusted Sites. Future downloads will not be marked as blocked.
For blocked files that have already been extracted, run this at a Powershell prompt to unblock all the files in the current folder and subfolders:
Get-ChildItem *.* -Recurse | Unblock-File
1) go to exe file click the properties
2) click the unblock button
then this will slove
For me, I needed to set the start up object in the Application settings.
Right click on the project name in the Solution Explorer. Click Properties. Go to the Application tab, Select the correct method from the Startup object dropdown.
Mine was not set, causing intermittent compile errors.

IIS Sub Application Unable to Read Web.Config

I have a website setup in IIS that has an application within it. For whatever reason, IIS can't access the web.config of this sub application. Looking in the website directory, the config file is right where it should be.
If I try to edit (through IIS manager) any configurations of the sub application I get the following error:
The file path in the error notification is correct, except for '\\?\' appended to the beginning.
The parent website web.config has no issues, and can be configured through IIS.
What could be causing this error? Thanks in advance.
Needed to install the component IIS URL Rewrite Module 2. Once this was in place, the web.config was consumed properly.

php_warning on installing ext

I want to intstall the ext "my_redirects". On my local machine it does what it should. But now, on the live site, i got this error:
1: PHP Warning: file_get_contents(/kunden/homepages/28/d574274134/htdocs/update7/typo3/sysext/core/Resources/Private/Sql/Cache/Backend/Typo3DatabaseBackendCache.sql): failed to open stream: No such file or directory in /homepages/28/d574274134/htdocs/update7/typo3_src-7.6.14/typo3/sysext/core/Classes/Cache/Backend/Typo3DatabaseBackend.php line 441
I got a hint to delete the typo3temp/autoload/ files. Then the installation works, but if i after that go into the install tool, i get this error again. Can someone give a hint?
This file is part of the core and must exist. Look into the src-tar/zip file. Maybe the file wasn't transferred to the server.
I don't think it's an autoload issue, because the .sql file is missing, not the PHP class.
Please verify that the sql file does exist. If it's missing, check the hash of your downloaded TYPO3 core. Make sure you compare the correct path on the server.
But I guess you got an access restriction. Maybe bad ownhership of that .sql file? Perhaps you ran into some security problems with file_get_contents() and at least sql files? So please also check your security settings.

Is it possible to xcopy deploy the Microsoft ReportViewer web control?

I'm trying to setup Microsoft reporting on a shared hosted server. I've set up the web.config files with the necessary entries and uploaded the assemblies Microsoft.ReportViewer.Common.dll and Microsoft.ReportViewer.WebForms.dll as well as the file Microsoft.ReportViewer.xml via FTP.
The site loads OK, but when I try to load a report a get a missing reference to Microsoft.ReportViewer.ProcessingObjectModel.dll. If I can get a hold of a copy of this dll, can I expect the report view to work? If so, what's the best way to get a copy? Or should I start trying to cajole the server administrator to run ReportViewer.exe?
This project is using Visual Studio 2008.
It appears that the answer is yes. I had never extracted a file from the GAC before, but it was pretty easy by following the command line method described in this question. Once the correct version of Microsoft.ReportViewer.ProcessingObjectModel.dll was extracted from the GAC on my development machine and uploaded to the site, the reports started working.