When IIS writes to the Windows Application Event log it adds the "User host address" (the users IP address), but this is not helpful when the XFF is being used (X-Forwarded-For). I have searched but could not find a way to include the XFF in the Application Event log when it includes the "User host address". Is there a way to do this?
Add X-Forwarded-For column in IIS 8.5 and newer versions:
Custom logging became easier to configure with the IIS 8.5. Follow the steps below to add X-Forwarded-For column into IIS logs.
Open IIS Manager
On server, site or application level, double click "Logging"
Click "Select Fields"
In "W3C Logging Fields" window, click "Add Field"
In the "Add Custom Field" window, fill out the following fields
Field Name: X-Forwarded-For, Source type: Request Header, Source: X-Forwarded-For
Click "OK" in both open windows
Click "Apply" in the actions pane
If your IIS version is before IIS 8.5, you can refer to the steps in this link.
Related
I am using the library https://github.com/aik099/PhpStormProtocol/ to get links to my IDE (PHPStorm) from the browser (Chrome). Everytime xdebug prints a warning, it attaches a link with an href like this:
phpstorm://open?file={filepath}&line={line}
That works perfect. The problem is that every time I click in the link I get a pop-up like this:
I have tried following the steps I found here:
https://superuser.com/questions/1481851/disable-chrome-to-ask-for-confirmation-to-open-external-application-everytime
After enabling that policy in the register of windows, and validating it also in my browser I still have the same pop-up without the checkbox to allow this protocol forever.
The problem is, that you want to open your url handler over a "http" connection.
But you get only the square if you have a "https" connection.
You can solve your problem if you set a rule, that your "http" connection is trusted.
For chrome write "chrome://flags/" in your address bar and write your url into the option "Insecure origins treated as secure" and set this to enable.
enter image description here
The ExternalProtocolDialogShowAlwaysOpenCheckbox does work on https websites only.
You can instead add you protocol phpstorm://* to Chrome's URLAllowlist, for example via the Windows registry :
The user will not see the popup at all and the software will open automatically.
I have a node.js application running on iisnode running on IIS 10 running on Windows Server 2019.
At one of these layers, there seems to be some caching of javascript files. For example, in my app.js file, I had this:
fs.appendfilesync('log.txt', 'CORS set up.\n');
...which was giving me the error:
appendfilesync is not a function.
I realized I had a typo: it should be camel cased. So I changed it to:
fs.appendFileSync('log.txt', 'CORS set up.\n');
But it kept giving me the same error, even specifying the exact same line and column in the file.
I know the caching is occuring on the server because the error is logged to iisnode's logs and because I leave it for a day and try again the next day and the error no longer occurs.
It's extremely frustrating when I'm trying to fix things on the server and I can't test my fix because it stubbornly won't update the cache.
How can I force iisnode, IIS, or Windows Server 2019 (whichever one is doing the caching, if not more than one) to clear the cache or to not cache?
Thank you.
Please make sure you assigned the iis_iusrs and iusr full control permission to the log.txt file.
To disable caching in iis you could follow the below steps:
1)using output caching:
Select your site in iis.
Double click on output caching feature from the middle pane.
Click edit feature setting from the action pane.
Uncheck Enable cache and Enable kernel cache.
2)clientCache:
Open Internet Information Services (IIS) Manager select your site.
In the Home pane, double-click HTTP Response Headers.
In the Set Common HTTP Response Headers dialog box, check the box to expire Web content, select the option to expire after a specific interval or at a specific time, and then click OK.
Trying to set-up a Oracle data source from the WSO2 Management Console. My problem is that the page where one would enter the connection details (url, username etc) shows up empty, there are no fields/columns.
From the Tools section - Database Explorer - I can connect to the database and retrieve data so I'm assuming that the drivers are ok.
Have tried to set-up the data source with several different browsers but all behave the same - I can enter the "Create Data Service" - page 1 and give a name to the data store. Then comes up the second page, titled "Data Sources" and there is the text/link "Add New Data Store". Clicking that open a new page (addDataSource.jsp) but it is totally empty, now even a single header or anything, only a help button on far right corner.
The version of DSS is 3.2.1.
Would someone know how to resolve this?
I have added the Zerigo add-on with heroku. I have followed the steps in the answer here.
Except for the third step. When I attempted to do that, I got an info message that I don't need to do that if I am using the add-on in heroku.
However, if I try to access my custom domain, I get an application error. Executing the command
$ heroku logs
I get the following output (pasted partially):
at=error code=H70 desc="Access to bamboo HTTP endpoint denied" method=GET
I went through this article which says that I need to replace proxy.heroku.com with myapp.herokuapp.com - but I don't understand how I need to do that. I tried adding the snippet as suggested in that stackoverflow answer linked earlier, but in that it points to proxy.herokuapp.com
I got this confirmed when I executed a ping command on my custom domain and got the following output:
64 bytes from proxy.heroku.com : icmp_req=68 ttl=46 time=289 ms
How do I get this working?
Go to https://dashboard.heroku.com/apps
Click on the name of your app
Click on "Zerigo DNS Zerigo Basic" and click "Configure". You should see your custom domain name listed under "Host Records."
Click "Add Snippet". Choose "Heroku" from the dropdown menu.
Click "Add Selected Records".
Go to the CNAME entry under host records and click "Edit". Change data from proxy.heroku.com to YOURAPP.herokuapp.com
I also had to do the following:
Go back to https://dashboard.heroku.com/apps
Click on the name of your app
Click on Settings
Under "Domains" add your custom domains e.g. mydomain.com. I also had to add one starting with "www."
You may have to wait 10-15 min for the settings to propagate.
If the error is ..
Access to bamboo HTTP endpoint denied"
Change your CNAME entry ..
yourdomain.heroku.com -> yourdomain.herokuapp.com
Is it possible is IT working, but you need to flush your DNS cache on your machine? That's a commmon problem, that your local machine has old/bad DNS data cached when you make a DNS change.
Quick test: try looking up the DNS record on your custom domain using
http://www.mydnstools.info/nslookup
If that looks correct, then google how to flush your DNS cache on whatever OS you are using.
I am attempting to create a deployment package for my website via Visual Studio 2010. The website in question has a binding that I point to 127.0.0.1 in my hosts file. My web application project settings point to that website and all works fine. When I try to create a package, however, the settings from the wrong site are used. How can I tell the deployment package to use the correct settings and what mechanism controls this?
Update:
It appears that the MapUriToIisWebServer task in Microsoft.Web.Publishing.targets is coming up with the wrong IIS website. Got that from the output of using msbuild via the command line:
Package:
Invoking Web Deploy to generate the package with the following settings:
$(LocalIisVersion) is 7
$(DestinationIisVersion) is 7
$(UseIis) is True
$(IisUrl) is http://mysite <-- correct url (use hosts file to point localhost)
$(IncludeIisSettings) is true
$(_DeploymentUseIis) is True
$(DestinationUseIis) is True
$(IisUrl_SiteID) is 2 <-- not the correct id
$(IisUrl_SiteFriendlyName) is notmysite.com <-- not the correct url
$(IisUrl_SiteRelativePath) is /
The MapUriToIisWebServer task appears to ultimately call upon Microsoft.Web.Publishing.Tasks.Iis7WebServer
to get the correct site info for the supplied url. The Initialize(UriWrapper uri, bool useLocalHost) call seems to do the work, and is going wrong somehow.
I found that this "site resolution" issue is influenced by the IIS site settings - particularly hostname and the "ip addresses". For example if I go to the site that is being incorrectly identified and change either the hostname to anything else OR change the "ip address" setting from "all unassigned" to a defined ip address, then the site resolution changes to another (also misidentified) site in IIS. Repeating this process again then resulted in the correct site being identified by the "build deployment package" process.
In short, there seems to be a bug in Microsoft.Web.Publishing.Tasks.Iis7WebServer