Error while publishing the web application - asp.net

I am a fresher in vs 2010 and developed a web project.
When I hosted directly the project its working fine.
When I am trying to publish it not working and giving an error 403
Error 1 Web deployment task failed.
(The metabase path 'http://localhost/webapp/login.aspx' is not supported.
Paths must be of the format '/lm/w3svc/<siteid>/ROOT/...'.)
The metabase path 'http://localhost/webapp/login.aspx' is not supported.
Paths must be of the format '/lm/w3svc/<siteid>/ROOT/...'.
The metabase key '/lm/w3svc/1964704031' could not be found.
The system cannot find the path specified. (Exception from HRESULT: 0x80070003) 0 0 WebApplication1
I referred many sites and didn't get any solution for this problem
Please anyone help me to solve this issue.
My OS is windows server 2003 iis 6.
I have given the
Publish method:WebDeploy
service url:http://localhost/webapp
Site/application:http://localhost/webapp/login.aspx
Please help me .Thanks in advance.

Site/application must be your SiteName/YourAppFolder for example like
Default Web Site/webapp

Related

HTTP Error 500.19 - Cannot read configuration file due to insufficient permissions

I'm new to this since I've registered for long time.
I have query regarding the
"HTTP Error 500.19 - Internal Server Error", which says "Cannot read
configuration file due to insufficient permissions".
The solutions on relevant post didn't solve my issue yet. I have Administrator right only on my local machine. Still getting same error, after changing the permission for users (IUSR, IIS_IUSRS), I have reset the IIS and re-boot the machine too. Is there any further steps to follow?
I'm using IIS 8 and ASP.NET, Windows 7 - 64bit.
Appreciate your help.
Answer followed and from the Stackoverflow
I was developing an ASP.net project in Visual Studio.
I pointed the IIS site path to the Visual Studio publish folder:
C:\Users\User\source\repos\ProjectName\ProjectName\bin\Release\Publish
When I used IIS to open the project I got the same error.
I realized there is a permission with IIS accessing that folder.
To work around this, I moved that folder to the C drive:
C:\ProjectName\
I then edit the site Path in IIS to point it and it worked for me.

Simple Asp .Net Application, error : Server Error in '/' Application

Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Version Information: Microsoft .NET Framework Version:2.0.50727.8689; ASP.NET Version:2.0.50727.8670
Configuration: .Net framework 3.5, windows 10 operating system [IIS express 10]
How can I solve this Problem, Please help me
Hosting server will typically generate a "404 Not Found" web page when a user attempts to follow a broken or dead link.
Check the URL and look for resource (webpage/service/view) does exist?
This means that the url you tried to access doesnt exist, or the IIS is not running, are you sure you ran it from visual studio using F5 ?

System.ComponentModel.Win32Exception: Access is denied when deploying to Plesk 12

I just deployed my ASP.NET MVC5 (.net 4.6) application to my hosting using Publish option in Visual Studio and selecting FTP mode. Now when I try to browse to the app address it gives me the System.ComponentModel.Win32Exception: Access is denied error. I'm using Plesk 12 in a shared hosting.
Please mind that it's a shared hosting and I'm using Plesk so don't come with the answer of changing IIS settings because I don't have access to that.
How do I fix it??
I had a similar problem and nothing was working for me. I fixed it by changing the .NET framework version to 4.5, instead of 4.5.2.
I wrote a short article about it which shows you how to change the framework version and includes other solutions to try that might fix the error for your. Hopefully this helps!

Web Deployment Error on publishing VS2013 solution

Hi am getting the following error when publishing this particular MVC application running on .netframework 4.5 to IIS7 (windows 2008)and IIS8 (windows 2012 )servers;
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(4077,5): Warning : Setting both property values of DeployAsIisApp and IncludeIisSettingsOnPublish to true is not recommended, as IncludeIisSettingsOnPublish is a superset of DeployAsIisApp
Transformed Web.config using E:\INSPNIA_WB0R5L90SUPDATED\INSPNIA_WB0R5L90S\MVC5_Full_Version\PCA\Web.Release.config into obj\Release\TransformWebConfig\transformed\Web.config.
Auto ConnectionString Transformed Views\Web.config into obj\Release\CSAutoParameterize\transformed\Views\Web.config.
Auto ConnectionString Transformed obj\Release\TransformWebConfig\transformed\Web.config into obj\Release\CSAutoParameterize\transformed\Web.config.
Copying all files to temporary location below for package/publish:
obj\Release\Package\PackageTmp.
Adding sitemanifest (sitemanifest).
Adding appHostConfig (Default Web Site/PCA).
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(4270,5): Error : Web deployment task failed. (Source (appHostConfig=Inspinia_MVC5) and destination (appHostConfig=Default Web Site/PCA) are not compatible for the given operation.)
Publish failed to deploy.
any help on resolving this will be appreciated. NB i have other solutions that are using the same framework and they are able to publish successfully hence i think it is a problem in the specific slution but am not able to figure out the exact issue
for the sake of someone who might experience the same....this worked for me
Replaced the following XML tags in the csproj file
<UseIISExpress>True</UseIISExpress> with <UseIISExpress>False</UseIISExpress>
<UseIIS>False</UseIIS> with <UseIIS>True</UseIIS>
<IncludeIisSettings>False</IncludeIisSettings> with <IncludeIisSettings>true</IncludeIisSettings>
In your solution explorer, right click your web application > Properties and then check your items to deploy. Uncheck(include IIS settings as configured in IIS Express).
You might also try deleting everything from your bin and rebuilding.

ASP.NET MVC error after deploy

I am starting with ASP.NET MVC development just now, after some years of ASP.NET WebForms.
Following a simple tutorial, I developed an HelloWorld ASP.NET MVC web site and deployed to the FileSystem using Visual Studio 2012 deployment tool: no problem to access it from my IIS.
I tried then FTP deployment to my Internet Service Provider (I just FTP-copied the files and folders contained in the FileSystem deployment made by VisualStudio). If I try to access the same site hosted by the ISP I get the following error:
Exception Details: System.TypeAccessException: Attempt by method 'DynamicClass.CallSite.Target(System.Runtime.CompilerServices.Closure, System.Runtime.CompilerServices.CallSite, System.Object)' to access type 'System.Runtime.CompilerServices.CallSite`1<Microsoft.VisualBasic.CompilerServices.IDOUtils+SiteDelegate0>' failed.
Source Error:
Line 4:
Line 5: <h2>Indewx</h2>
Line 6: <div>#Me.ViewBag.Message</div>
Source File: D:\Inetpub\webs\pgsoftwareit\Views\Home\Index.vbhtml Line: 6
Any suggestion? Any params in the web.config to be tuned? Or problems with trust by the ISP?
Thank you in advance
Try
<div>#ViewBag.Message</div>
instead of
<div>#Me.ViewBag.Message</div>

Resources