Change website URL in IIS - url

I have a site set up in IIS that I'm currently accessing via localhost, I'd like to access it via URL mysite instead for example... I have edited the binding in IIS to add mysite as a host, and have also added the line 127.0.0.1 mysite to the hosts file. When I try and access mysite via a browser it seems to be trying to go to the correct location but keeps requesting a username and password and won't accept the one I am logged on with (Windows Authentication is enabled in IIS).
Is there another setting somewhere that I need to change?
Thanks

Check the authentication in IIS for the site. It should be "Windows Authentication".
In addition, you can also check the IE settings for Local Intranet. It should be set to "Automatic logon with current user name and password" or "Automatic logon only in Intranet zone".

Related

azure file share access via web application

C# ASP.NET MVC web application - I followed all the steps from https://blogs.iis.net/davidso/azurefile in order to be able to access my Azure location by unc.
My newly created local user is in the IISUSER Group and has the same username and pwd (storage key).
I then created an application in my website using a new APP Pool (integrated) w/said local user.
I ran the caspol command as well.
The issue I run into is when trying to do a file.SaveAs, I get an error
Incorrect username or password
Server.MapPath({application}) returns the correct unc path but doing a Directory.Exists won't locate the path.
When viewing the "connect as" with specified user in IIS I get no issues, additionally I can access the unc path directly from my local machine with same creds.
I tried going to the app pool of the application and set the user directly but no change there. Are there changes I need to make on the Website configuration that the application sits in? Prior to converting this to an application I initially had it configured as a virtual directory and got the same error.
Set the load user profile to "True" in the application pool:
try to set the azure user in iis anonymous authentication by clicking on the edit:

Possible to test Google social login locally?

I want to test the Google Social login system on my local machine. However when I create a new OAuth button: 'Create New Client ID' it requires me to fill in the Authorized redirect URI which needs to be a valid address (ends with .com or .org).
Obviously when we develop locally we don't have the .com or .org at the end. I have a virtualhost setup... and my address to my local development is mywebsite.local
Is there a way to input the redirect URI to be mywebsite.local without receinv the error:
Invalid Redirect: http://mywebsite.local/login/auth must end with a
public top-level domain (such as .com or .org)
Further to pinoyyid's answer, here's what you'd want in your /etc/hosts file.
0.0.0.0 mywebsite.com
I put new rules after everything else that's already in there.
you can then access your development site at mywebsite.com and enter the correct redirect URL in the Google Developer's Console.
You can set "Authorized redirect URI" to local IP (like http://127.0.0.1/callback), it's working fine for me.
What really agonizing is that google don't allow user to config an external IP (let's say your server IP like 99.99.99.99) as "Authorized redirect URI", google want the "Authorized redirect URI" to end with a public top-level domain (such as .com or .org).
Just map your dev server IP address to dev.example.com in your /etc/hosts.
I made a simple tool for this exact purpose.
Just set your redirect URL to http://redirectmeto.com/http://mywebsite.local/login/auth
You can ngrok to tunnel your localhost into public site, as described here.
The key is to use an https URL on your local environment.
On OSX you can install local https certificate: https://github.com/FiloSottile/mkcert
Or use Laravel Valet.
So, your new localhost URL becomes: https://mywebsite.local
Then save this https callback on google. Works on my computer
In my experience you have to use localhost or url with public top level domain (I use .bar) and all redirect urls have to be https (in case you want to have verified google app - needed for sheets/drive api)
Steps will help for windows users:
Go to host file which should be C:\Windows\System32\drivers\etc
Create add entry in host file like
127.0.0.1 localhost.com
Save it. User localhost.com as a organization in google dev console.
Thanks.

asp.net mvc3 windows authentication only works on local computer

I have a mvc3 applicaiton using windows authentication. it works fine on my local pc.
<authentication mode="Windows" />
after I deploy it to the dev server. every time, i go to the site, a login popup shows up, I need to enter ID and password to access the site. on my local computer, I never see this popup login form. always automatically logged in. What do I need to change on the server side to fix this issue.
in the IIS, I disabled anonymous authentication, only enabled windows authentication. My computer and the serve are on the same domain.
You need to add the server to the local zone in internet explorer. The server needs to be added to the local intranet as it is not being automatically detected. Add the server to this list, restart IE and it will authenticate automatically.

HTTP Error 500.19 - Internal Server Error 0x8007052e

I copied an MVC project from another development pc to my laptop and tried to deploy it on the laptop which gave this error. The user account password was changed recently prior to this error. I tried tinkering around with the app pool permissions for the root folders with no effect. Any ideas? I am stuck.
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information
Module IIS Web Core
Notification Unknown
Handler Not yet determined
Error Code 0x8007052e
Config Error Can not log on locally to C:\inetpub\wwwroot as user {MY ACCOUNT} with virtual directory password
Config File \?\C:\inetpub\temp\apppools\ASP.NET v4.0\ASP.NET v4.0.config
Requested URL http://localhost:80/hts
Physical Path
Logon Method Not yet determined
Logon User Not yet determined
Config Source
145: <application path="/" applicationPool="ASP.NET v4.0">
146: <virtualDirectory path="/" physicalPath="%SystemDrive%\inetpub\wwwroot" userName="{MY ACCOUNT}" password="[enc:AesProvider:{etc etc etc}:enc]" />
147: </application>
Open the Internet Information Services (IIS) Manager (Start > Run > type "inetmgr").
Using the navigation pane on the left, browse to Sites > Default Web Site.
Right-click on Default Web Site and select Manage Web Site > Advanced Settings.
Set the Physical Path Credentials field to Application user (you must enter user and password).
Click OK and then OK again.
Right-click on Default Web Site and select Manage Web Site > Restart to refresh the changes that were just made.
At this point you should be able to reload the page in your browser.
Open IIS Manager
Select the site. Default Web site in my case and click "Basic Settings..."
This opens the Edit Site dialog.Click "Connect as".
In the Connect As dialog, click Set and provide the new password in the Set Credentials dialog.
Come back to Edit Site dialog and click "Test Settings..."
Once the connections succeeds, you should be able to successfully open the site in your browser.
I ended up reinstalling visual studio and eventually got everything working.

TFS 2010 Team Web Access - continuous authentication prompts appear and page never fully loads

at my company we have a number of clients and partners accessing our TFS 2010 SharePoint project portal and Team Web Access site over the Internet (https mostly but in this case http). For most of them everything works fine. For one client though, the following happens:
Authentication prompt appears when accessing either the project portal or Team Web Access
User types in username and password
The page loads half-way with text, but without CSS or images loaded.
Prompt appears again, even if "Remember password" is checked in the browser dialogue (IE8)
User tries the same procedure 10-20 times but gives up, resulting in an incomplete page load with no CSS or images.
In our attempts to remedy this we have opened ports 80, 8080, 443, 1443, 8000 but the errors still occurs for this specific client.
We thought it might be related to port 8080 causing firewall problems, so we moved Team Web Access to port 80, but the problem is still there.
Why could this be happening? The client certainly wants to know but I'm afraid I have no good answer yet.
Try change Internet Options > Advanced > Under the security section > uncheck "Enabled integrated Windows Authentication".
Try adding your Team Web Access URL to the Intranet Zone sites list. Internet Options > Security > Local Intranet > Sites > Advanced. There is a security setting that says 'Automatic logon only in Intranet zone'.
Also, take a look in Control Panel > User Accounts > Manage Windows Credentials and make sure that an incorrect password is not saved for the site.

Resources