I am creating short urls as we have done with tiny URL, based on the link:
http://www.emadibrahim.com/2009/05/07/shortening-urls-with-bitlys-api-in-net/
But I am getting an error:
The remote server returned an error: (407) Proxy Authentication Required.
How can I resolve this issue?
I'm using C#.
<system.net>
<defaultProxy useDefaultCredentials="true">
<proxy usesystemdefault="False" proxyaddress="http://127.0.0.1:8888" bypassonlocal="True" />
</defaultProxy>
</system.net>
by using useDefaultCredentials="true" i can get ride of the problems.
Related
How can I put my kibana5 behind a iis reverse proxy?
My url is myserver/kibana5/ which is redirect to localhost:5601 but when I try to access to my kibana trought myserver/kibana5/, the url is transform to myserver/app/kibana/.
Without kibana5, this can't work.
Someone have the solution?
Thank you.
Go to kibana.yml file is in kibana home --> config, and change the host to yours kibana server and delete the # char
Solved with the support :
-Modify basepath in kibana cfg file to /kibana5
-Modify IIS to accept invalid char like * and configure your reverse proxy
<system.web>
<httpRuntime requestPathInvalidCharacters="" requestValidationMode="2.0" />
</system.web>
I'm building a website installer, during the installation phase I need to create an application pool and a website under IIS.
During the install / uninstall phases everything works fine: IIS is configured as expected.
Now I can't figure out how to obtain a decent user experience on upgrades: actually the setupkit overrides every configuration on the website (i.e. port bindings).
Is it possible to instruct Wix to not alter the website / application pool configuration during updates?
Here the code:
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="INETPUB" Name="Inetpub">
<Directory Id="INSTALLFOLDER" Name="MyWebSite">
<Component Id="MyWebSiteIssConfiguration" Guid="MY-GUID">
<Condition><![CDATA[NOT Installed]]></Condition>
<iis:WebAppPool Id="MyWebSiteAppPool"
Name="[APP_POOL_NAME]"
Identity="localService"
ManagedPipelineMode="Integrated"
ManagedRuntimeVersion="v4.0" />
<iis:WebSite Id="MyWebSiteWebsite" Description='[WEB_SITE_NAME]' Directory='INSTALLFOLDER' AutoStart='yes' StartOnInstall='yes'>
<iis:WebAddress Id="AllUnassigned" Port="[WEB_SITE_PORT]" />
<iis:WebApplication Id="MyWebSiteApplication" Name="[WEB_SITE_NAME][WEBSITE_ID]" WebAppPool="MyWebSiteAppPool"></iis:WebApplication>
<iis:WebDirProperties Id="MyWebSiteWebDirProperties" AnonymousAccess="no" WindowsAuthentication="yes" />
</iis:WebSite>
<CreateFolder/>
</Component>
</Directory>
</Directory>
</Directory>
In the end I've found a workaround that fits my needs.
First of all I've marked the component containing the website configuration (MyWebSiteIssConfiguration in my sample code) as Permanent='yes': this way the website is never uninstalled.
Also I've set ConfigureIfExists='no' on the website so during upgrade the configuration on the website is left untouched.
I have the following configuration:
Running Windows 7 Pro
Running local IIS 7.5 ( for web development purposes )
Edited hosts file to be able to use http://www.sitestepper.dev
Site build in subfolder of the inetpub/wwwroot/staplijst
Site can be viewed using http://www.sitestepper.dev/staplijst/whatever-page.htm
I have an http://www.sitestepper.dev/p.asp page I would like to call when an unknown page is requested. This technique works fine on the deployed version of this web site (deployed on an Windows 2003 server running IIS 6 - not sure about the 7 but it is the version deployed with Windows 2003 server).
I tried ( in the Edit Custom Error Dialog ) :
Execute a URL on this site: with value /staplijst/p.asp
and
Respond with a 302 redirect: with value http://www.sitestepper.dev/staplijst/p.asp
I tried this in the properties of the 'Default Web Site' , and I tried this at the staplijst level.
Even tried it with values without the /staplijst.
I restarted the default web site after each change. And even stopped/started the Web service.
But nothing seems to work, I keep getting the 'Server Error In Application "DEFAULT WEB SITE"' , HTTP Error 404.0 error.
What am I missing here - probably something obvious, but I don't see it ?
I just configured the following to reproduce your setup:
In the web.config file:
<configuration>
<system.webServer>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404"
prefixLanguageFilePath=""
path="/p.asp"
responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
</configuration>
In the root of the site I have a simple script called p.asp that does a Response.Write "Hello World".
If I browse to a page that doesn't exist p.asp is redirected to and I see "Hello World".
If I use the following in my web.config:
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404"
prefixLanguageFilePath=""
path="http://www.sitestepper.dev/p.asp"
responseMode="Redirect" />
</httpErrors>
This redirects as expected to p.asp and again I see "Hello World".
The only thing I can think that is wrong is that you say that p.asp lives in the root of the site: http://www.sitestepper.dev/p.asp but the ExecuteURL and Redirect response mode paths include /staplijst in the path.
To answer my own question: I needed to set the Error response to Custom error pages in the Edit feature settings... of the relevant site for this to work. It was set to 'Detailed errors for local requests and custom error pages for remote requests'.
I never had to do this in previous version of IIS, but maybe in those versions this was implied. Or maybe the host setting www.sitestepper.dev is causing the pages always to behave as local requests - anyway this has changed in IIS 7.5 I'm sure.
I searched for this solution without seeing the answer of 'Kev'. As a rule I tend not to edit config files directly if a solution can be found using the presented user interface panels.
I will accept his response as solution though.
.
I have internet connection via http proxy, and some of my web applications at localhost need to access internet. Where can i set up proxy settings for them?
All I needed was to set system.net in web.config
<system.net>
<defaultProxy>
<proxy
proxyaddress="http://10.0.2.231:42"
bypassonlocal="true"
/>
</defaultProxy>
</system.net>
See: Element (Network Settings).
We've inherited an application that uses the Intelligencia.UrlRewriter module. Our environment though is IIS7. We've already set our site to run in the classic asp.net application pool (which aparantly works for a lot of these kinds of problems). However we're still not seeing the URLs in our app be rewritten.
Has anyone run into this?
You need to define the config on the system.webServer element, like:
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<add name="UrlRewriter"
type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter" />
</modules>
</system.webServer>
You can keep both config. What you probably have now is:
<httpModules>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter" />
</httpModules>
Check the section "Migrating ASP.NET Applications to IIS 7.0 Integrated mod" on http://learn.iis.net/page.aspx/243/aspnet-integration-with-iis7/
ps. I have been using it with no trouble at all, as long as that config is in.
Update 1: Also check http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx, particularly "Approach 3: Using an HttpModule to Perform Extension-Less URL Rewriting with IIS7", since the config I added has the extension-less config.
Yes I had the exact same problem with Intelligencia.UrlRewriter module, running under Win Vista & IIS7, however switching to the classic asp.net app pool did fix the problem. Are you running the app in a new virtual directory? That can sometimes mess with the root path to the application which could make a difference to the rules in the web.config
I have spotted the same problem, after few tries I found out that changing asp mode to integrated pipeline helped.
Don't forget to add the following lines in the system.webServer section of your web.config file if you are using IIS7
<system.webServer>
<modules runAllManagedModulesForAllRequests=”true”>
<add name=”UrlRewriter” type=”Intelligencia.UrlRewriter.RewriterHttpModule” />
</modules>
<validation validateIntegratedModeConfiguration=”false” />
</system.webServer>
As in
http://frozengraphics.wordpress.com/2009/12/06/intelligencia-urlrewriter-and-iis7/