Error while publishing Lightswitch application remotely from Windows 7 PC to Windows 2003 Server having IIS 6.0 - iis-6

I am trying to publish a Light Switch 2012 application as Web Application from Windows 7 PC to Windows 2003 IIS server, .Net Framework 4.0
The publish Summary as follows
Application Name - User Test
Application Version - 1.0.6.0
Application Type : Browser
Application Server : IIS Server
Authentication : Windows Authentication
Database : Do not publish
Error details while publishing with the option "IIS server has lightswitch deployment prerequisites installed".
============================================================================
102 Web deployment task failed. (15/04/2014 16:24:51) An error occurred when the request was processed on the remote computer.)
(15/04/2014 16:24:51) An error occurred when the request was processed on the remote computer. The entry type 'unknown' was not expected at this time. The serialization stream may be corrupted.
When published without the option "IIS server has lightswitch deployment prerequisites installed".
the applications publishes successfully, But when the application is accessed from Browser it says authentication error.
I have searched a number of blogs with the same issue, but none have answered.
Any help will be highly appreciated.

From the errors you can conclude :
Your server does not have lightswitch deployment prerequisites installed.
There is a problem with authentication.
You must further investigate what authentication problem occurs. As the question is now, there is no way to guess what the problem is.

I would suggest the following steps to workaround the authentication error.
Keep the option in the publish wizard i.e "IIS server has lightswitch deployment prerequisites installed". and
1.In publish wizard choose the option "Yes,Create an application
Administrator" and mention your login credentials.
2.Make sure you have rights on the database that you supplied while deploying
the application. for example I use "sa" account to deploy the
database.
3.In webconfig file, makesure you are the admin to the app.
/* !-- If no admin user exists, create an admin user with this user name->
add key="Microsoft.LightSwitch.Admin.UserName" value="DOMAIN\EMPID" />
*/
4. Assuming If you are able to deploy the application with no errors and still get the get authentication info or load error, check the table called [dbo].[aspnet_Applications] in the deployed database and makesure
your app name mentioned in the table data.If not the issue is with
database permissions.
5.Makesure your UserID shown up in the table [dbo].[aspnet_Users]
Hope this information helpful :)

Related

Using Web Deploy with Visual Studio and Plesk

I am trying to web deploy a Asp.Net Core 2 project through plesk.
My plesk version is;
Plesk Onyx
Version 17.8.11 Update #6
IIS 8.5.9600
I have also followed the guide and added web deploy to the server;
Plesk Web Deploy Guide
However, when I go to publish my website i get the following error;
Web deployment task failed. (Connected to 'www.domain.co.uk' using the Web Deployment Agent Service, but could not authorize. Make sure you are an administrator on 'www.domain.co.uk'. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_NOT_ADMIN.)
Make sure the site name, user name, and password are correct. If the issue is not resolved, please contact your local or server administrator.
Error details:
Connected to 'domain' using the Web Deployment Agent Service, but could not authorize. Make sure you are an administrator on 'www.domain.co.uk'. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_NOT_ADMIN.
The remote server returned an error: (401) Unauthorized.
Now I have tried the admin login for the plesk portal and I still get this message?
How and where do I add user privileges (just for this site) to allow the web deploy to work?
UPDATE
I have gone to subscriptions -> selected the subscription -> users, create a new user for this and then added a new administrator user her. But again when I try to run the web deploy through visual studio I am getting the same error (the user is definitely in the admin role).

Lightswitch Deployment (Visual Studio 2013) Tier-3 with No Authentication

I am attempting to deploy a simple lightswitch application (HTML not Windows app) in VS 2013. I have selected to not have authentication to make the testing easier.
The IIS server and the database server are on different machines. I have followed the steps here for server setup.
However, when I go to the website after publishing, I get this error:
You do not have permission to view this directory or page.
I went to the IIS server and made sure that only Windows authentication was enabled on the application that was sent over. After reading another MS article on the 401 error, they recommended unchecking the Kernel Mode Authentication. That only prompted a username/password request, which did not work.
What am I doing wrong here? I assumed having no authentication setup in the deployment would make the website open to anyone on our network. Not the case?
Found the problem(s) with this one.
Problem #1
When I downloaded / installed Microsoft's Web Platform Installer on my IIS server, the LightSwitch application I was working on and several other seemingly random websites/apps in the IIS all had the Authentication settings disabled for every authentication type (Anon, Basic, Windows, Forms, etc.). Had to go and Enable windows authenication on several websites. Did not expect that...
Problem #2
HTML Client folder was not loaded on the machine for some reason. Removed Lightswitch app from IIS and deleted the folder. Created a package for install in VS2013 and then copied the zip file over to the IIS server. Flawless install after that... One thing to watch for it to change the default setting in IIS from 'default.htm' to 'default.aspx'.

Web Deploy results in ERROR_COULD_NOT_CONNECT_TO_REMOTESVC

We are trying to configure continuous integration with TFS 2012. While queuing a new build, the publish fails with the error:
Build FAILED.
"C:\src\ProjectName.sln" (default target) (1) ->
"C:\src\Website\ProjectName.csproj" (default target) (2) ->
(MSDeployPublish target) ->
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4377,5): msdeploy error ERROR_COULD_NOT_CONNECT_TO_REMOTESVC: Web deployment task failed. (Could not connect to the remote computer ("ServerName") using the specified process ("Web Management Service") because the server did not respond. Make sure that the process ("Web Management Service") is started on the remote computer. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC)**
I checked all the points mentioned in the IIS.NET documentation for this error. Both services mentioned, Web Management Service and Web Deployment Agent Service, are running fine. A restart of those services has no change in behavior.
Windows Server 2008 R2 with IIS 7.
Web Deployment Agent Service is running on port 8172.
Web Deploy 3.0
Windows Firewall is not blocking any port on the server.
How can this be fixed?
If you install Web Deploy 3.x BEFORE Web Management Tools are installed, you'll have to re-install Web Deploy. I beat my head against the wall for hours on this.
Install the Web Management Services ("Turn Windows Features On/Off"/Roles -> Web Server -> Management Tools -> Management Service)
Then uninstall Web Deploy (repair didn't work) via the usual Add/Remove Programs control panel
Install Web Deploy 3.x again using Web Platform Installer.
Fixed. /Sigh
Double check in your Web Deploy settings that the name of the website is exactly that of what's in IIS.
Ben Day blogged more about it.
Fix that i saw on another website:
Fix it by adding “http://” to server.
In other words, when server is www.xxxx.com would get the 403 error, but when server is http://www.xxxx.com, then it works.
You need also to indicate the app name e.g 'Default Web Site/MyApp'
That was my error. Once I added /MyApp, it worked.
I got this error when using msdeploy, not TFS. In my case I needed to make sure the user msdeploy is using had permission to deploy to the website.
Find the website in IIS manager, right click and go to Deploy, then Configure Web Deploy Publishing. Find the user used by Web Deploy and setup for this website.
In my case the Internet proxy was enabled on source - which made msdeploy to reach out to internet instead of local ICN.
You should check the logs on your IIS first - see that you actually get to the server, and then you can locate the exact error here - https://support.microsoft.com/en-us/help/943891/the-http-status-code-in-iis-7-0-iis-7-5-and-iis-8-0
Uninstalling and re-installing (not repairing!) after setting up IIS did most of the magic for me.
There is another possible cause of the error. IIS Managemente Service have its own configuration for IP Address Restrictions, which default value is Deny Access for unspecified clients (Windows Server 2012 R2 with IIS 8.5).
You must set this value to Allow or add access to your specific IP address/IP address range using the Allow... button.
Remember, you must Stop the Management Service previously to change this configuration.

WebDeploy gets Unauthorized error while deploying via remote Web Deployment Agent

I have a remote server (Win2008R2) with WebDeploy 3.0 installed on it. Web Management Service isn't installed on it (actually I tried to install it but it cannot be contacted due to closed ports on my side).
I'm trying to deploy a package (zip) to the server via local WebDeploy 3.0 tool.
Server.deploy.cmd /T /M:myserver.no-ip.org "/U:myserver\Administrator" "/P:pwd" /A:Basic
I tried both Basic and NTLM auth methods.
I'm getting error:
Error Code: ERROR_USER_NOT_ADMIN
More Information: Connected to 'myserver.no-ip.org' using the Web Deployment Agent Service, but could not authorize. Make sure you are an administrator on 'myserver.no-ip.org'. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_NOT_ADMIN.
Error: The remote server returned an error: (401) Unauthorized.
Error count: 1.
Please note that I'm actually connectin to WebDeploy Agent Service not Web Management Service. That's important as there are tons of info how to setup WMSrc with WebDeploy.
I know that WebDeploy Agent only supports connecting as Administrator. That is my case - I'm specifying the remote server Administrator credentials.
I tried to open WDAgentSrc url in the browser. I was promted for creditials and they were accepted.
I checked "Microsoft Web Deploy" log in the Event viewer - it's empty.
How to get it working?

Report Server not available after Team Foundation Server 2008 SP1 install

We installed SP1 on our Team Foundation Server 2008 server. Everything seems fine after the install, except there is a red X on the Reports folder in the Team Explorer in Visual Studio. If we attempt to access the Reporting Services web site, we get a message that says that the "report server is unavailable". There were no errors during the installation.
The Reporting Services service started up fine and left no errors in the event log. We looked at the Reporting Services Configuration Tool and everything shows as OK. We tried restarting the RS service and rebooting the machine. Again, no errors but still no report availability.
The SQL Server instance where our data lives is up and running fine and we can query the OLAP cube and the relational side with no problem. All of our developer machines are already at VSTS 2008 SP1. Visual Studio is not installed on the server.
We looked at the logs files in the RS folder and the only errors that show are the ones that we get when we try to access the web site from IE, but that don't seem to contain any more info about the root cause.
Any help would be greatly appreciated. I'll post any updates on other things we try here.
UPDATE: There is a login error showing up the ReportServer(timestamp).log file. The login on the reporting services service is not the login that is showing up in this error, so I'm not yet sure what process is actually trying to make the connection to the db.
We got this resolved. It appears that the TFS 2008 SP1 install process decided to change the identity setting of application pool for the Reporting Services web site. To resolve we needed to:
Open Internet Information Server Manager
Go into Application Pools
Right click on the Reporting Services application pool
Click on the Identity tab
Change the account from NetworkService to our TFS domain account
Edit the rsreportserver.config located in "\Program Files\Microsoft SQL Server\MSSQL.1\Reporting
Change the "NT Authority\NetworkService" to "OurDomain\TFSDomainAccount"
Restart IIS
Hope this saves someone else some time.
Check the IIS application pools. My feeling is that reporting services doesn't play nice with other web applications (usually I've fixed this in the past by setting a seperate pool for the other applications).