Lightswitch Deployment (Visual Studio 2013) Tier-3 with No Authentication - 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'.

Related

Connect VS2022 debugger to ASP.NET Core application hosted on windows server IIS (2019)

I'm having issues with ASP.NET Core 6 app on my VPN Windows server 2019. Basically, I have Syncfusion OCRProcessor with tesseract files, but my application can't find part of the path for tesseract binaries on server when locally is working fine (on server error message is "cannot find part of the path C:\inetpub\wwwroot\myapp\x64").
After contacting Syncfusion support didn't solve the issue, I have checked for permissions in file system, double checked the locations of the binaries on IIS, checked if dll's are blocked in from Windows in file system. I have tried to connect from my machine with VS 2022 Community to my VPN server (public IP address) to try to debug the application, but going trough all the documents about remote debugging, still I can't connect to my app and hit the breakpoint in code to determine what is happening..
I have installed remote debugger for VS 2022 onto server, configure it and started, I have published application again over web deploy with debug config to IIS, but I just don't understand next step - how to attach to the process on external server..
Most of the videos and documentation suggests that IIS is installed locally on development machine, or IIS is on some PC in local network, but I have public server.. Can anyone help with the advice how to proceed further?
Thanks!
Ok, I have managed to connect debugger from VS 2022 to IIS.
The issue was in port, firewall and also in description on Microsoft help site https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugging-aspnet-on-a-remote-iis-7-5-computer?view=vs-2022 where in step 3 is written "Set the Qualifier field to and press Enter." - you need to enter ip address and port into connection target textbox.
After succesfull logging in onto server, I needed to select w3wp.exe process with title "CoreApp: https://.. ", set breakpoint in VS 2022 and open ASP.NET Core app in browser. After that I managed to debug application on IIS.
Hope this would be helpful to someone!

The remote certificate is invalid according to the validation procedure using IdentityServer3

I am using the ThinkTecture IdentitySever3 in my Web Api project and it has been working fine for the past 2 months in the project I am developing. Suddenly as of today, I am running into this exception when I try to use authentication:
"The remote certificate is invalid according to the validation procedure"
The project is using the idsrv3test.pfx that comes as a part of the IdentityServer3 samples.
Any ideas why it would suddenly start to behave like that? And how to fix it of course?
I was running into very similar issues.
I had to go into MMC add the certificate plugin.
Find and remove all certificates with localhost.
Reboot
Go to programs and features in windows Search for IIS Express and select REPAIR
Reboot
Launch Visual studio 2015 Open my Application with IdentityServer in it.
Run it and accept the prompt in VS 2015 to add and trust the
localhost cert.

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

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 :)

Unable to launch solution: MyApp is configured to use IIS. The Web server 'http://localhost:64646/' could not be found

When trying to launch solution, I receive the following error:
error : The Web Application Project MyApp is configured to use IIS. The Web server 'http://localhost:64646/' could not be found.
How do I resolve this issue?
I opened IIS and set the TCP port on the Default Web Site to 64646 and the project loaded without error.
You need to install IIS on your development machine.
Using IIS you'll also need to run Visual Studio in Admin Mode as well.
It is recommended that you use IIS Express since it will allow you to run VS without Admin privileges.
You have to install IIS and create the web site in IIS with the matching port number. Someone else created the visual studio web project to use IIS and configured it on their computer. Each person who opens the solution has to have all the websites configured in IIS manually.
You might consider creating a script that auto-creates them in the source repository. You can do it using AppCmd.exe (ADD SITE, ADD APPPOOL, LIST APPPOOL, LIST SITE) (%windir%\system32\inetsrv\AppCmd.exe).

Use WebDav in Sharepoint 2010

I have done some research, based on the problem that my single server gives me when I try to open a document library in windows explorer from the ribbon menu item "Open in Windows Explorer".
The same problem occurs when I try to map sharepoint to a folder in windows explorer too.
The error is:
Your client does not support opening this list with Windows Explorer
From the net, suggestions are:
(Since I'm trying this operation from server itself) enable Desktop Experience
Install the KB907306 update.
Enable IIS webDav service (Some say, it's just for additional functions from the MS Whitepaper)
(Edit) Started webClient service
I've already done them. Nothing changed. Proper machine restart and iis too have done.
Need some serious advice.
Thanks in advance.
Not sure if we are having exactly the same problem BUT I have had similar problem while accessing SP via Windows Explorer in Windows Server 2k8.
What I done to fix it is following:
Install new server feature called Desktop Experience (it comes with WebDAV redirector, which allows you to connect to WebDAV) - Note: Server will need to be restarted.
In Services start WebClient service (go to properties and make sure it starts automatically)
You will now be able to access your sharepoint via entering network path such as \sharepointhost\application\myawesomeapplication\ etc.
Hope that helps.
If you are trying to do this from the server, test it from a server which is not on the SharePoint farm (or better yet, a client machine). Ensure all of your testing is done from machines which are not on the farm.
Do NOT enable the IIS WebDAV service, as SharePoint provides its own WebDAV service and the IIS one overrides it in the pipeline. Enabling this service is a sure path to breaking WebDAV.
If you have SSL enabled, you may be in for a rough time getting it to work. Start by understanding how to use the 'net use' command, and the #SSL suffix.
make sure your webdav is installed as feature
make the following registry fix (http://support.microsoft.com/kb/841215) :
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters
Add a new DWORD "BasicAuthLevel" and change this to "2"
Restart your machine (and make sure it is enabled in IIS)
Make sure that WebClient windows service is running in the server. This shall appear in client operating systems like Windows 7, windows 8 however, on the server operating systems like Windows Server 2008, it shall be installed by enabling the server feature "Desktop experience" using Server Manager
This issue nearly killed me. I found that I was using a 64 bit version of my browser and that is'nt supported. I changed over to the 32 bit and it works.