How to use BizTalk Health Monitor with an authenticating proxy? - biztalk

How to use BizTalk Health Monitor with an authenticating proxy?
Is there anyway to use the BHM, specifically the "Repository Update" option, when you're behind an authenticating proxy?

I think you can create a file "ChkBHMRep.exe.config” in the BHM setup folder and update like this :
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.net>
<defaultProxy enabled="true" useDefaultCredentials="true">
<proxy usesystemdefault="true" />
</defaultProxy>
</system.net>
</configuration>
It is indeed ChkBHMRep.exe which checks for BHM repositories updates
Let me know if it works
JP Auconie
BHM team

Related

How to read Automatic Proxy Detection (WPAD) in Asp.net core

in asp.net we can use the following setting in web.config to point to a wpad.dat file to read all the proxy setting, is there a way we can achieve the same thing in asp.net core?
<system.net>
<defaultProxy enabled="true" useDefaultCredentials="true">
<proxy autoDetect="True" scriptLocation="http://wpad.dat" />
</defaultProxy>
</system.net>

Internal Server Error with web.config ipSecurity

This is my web.config which has some tags for blocking Ipaddress
<configuration>
<connectionStrings>
...
</connectionStrings>
<appSettings>
....
</appSettings>
<runtime>
....
</runtime>
<system.webServer>
<security>
<ipSecurity allowUnlisted="false">
<clear/>
<add ipAddress="127.0.0.1" allowed="true"/>
<add ipAddress="83.116.19.53" allowed="true"/>
</ipSecurity>
</security>
</system.webServer>
</configuration>
My intention is to block any other IP except the above. The above is the only Ip address I want the website to be accessible from . But with "ipSecurity" tag I am always getting
500 - Internal server error and the site runs fine without it.
I have made sure that "IP and Domains Restrictions" are installed on the server.
Please let me know if I am missing anything.
Thank you.
For others that run into this issue. The cause of the issue is that Feature Delegation doesn't allow the feature to be managed by web.config.
To Fix:
Verify that the Feature is enabled for web.config management
In IIS 7, click on the root server
Double click Feature Delegation (under management)
Scroll down to IPv4 Address and Domain Restrictions
Change the delegation to Read/Write (in my case it was Read Only, which was the issue)
Hope this helps someone else.
For Windows 10 and Visual Studio 2015 note that the ApplicationHost.config file has been relocated to the .vs\config folder in your project's folder hierarchy. You will need to edit the project specific version of the ApplicationHost.config file found there with...
<section name="ipSecurity" overrideModeDefault="Allow" />
If you only edit the ApplicationHost.config located in your Documents\IISExpress folder this will not affect your existing application (MVC5 appl in my case).
Open the applicationHost.config file (located at %windir%\system32\inetsrv\config\applicationHost.config) and edit the ipSecurity section.
Change this line:
<section name="ipSecurity" overrideModeDefault="Deny" />
To:
<section name="ipSecurity" overrideModeDefault="Allow" />
Are you editing the config by hand or through IIS manager?
See this post about that error message as you may not have that feature delegation enabled
http://forums.asp.net/t/1220987.aspx
Try this outside System.Webserver tag
<location path="Default WebSite">
<system.webServer>
<security>
<ipSecurity allowUnlisted="false">
<clear/>
<add ipAddress="127.0.0.1" allowed="true"/>
<add ipAddress="83.116.19.53" allowed="true"/>
</ipSecurity>
</security>
</system.webServer>
</location>
Hopefully this will help someone...
I am running IIS express on Windows 7 locally and did the following - Control panel > Programs > Programs and features > Turn Windows features on or off
In the Windows Features dialog ensure the IP Security option is checked:
I also had to open up my applicationhost.config (under %userprofile%\Documents\IISExpress\config) file and change the following:
<section name="ipSecurity" overrideModeDefault="Deny" />
To
<section name="ipSecurity" overrideModeDefault="Allow" />
Don't forget custom site delegation. This allows you to only allow delegation to sites you intend.

Authentication issue in jsonp ria services

I am using ria services with jsonp endpoint. When I call my method in service file it works fine in ie and firefox but sometimes works in chrome and sometimes I get "Cross domain javascript callback is not supported in authenticated services." error. Even I dont use authenticated services.
Here is a piece of code about what I have.
Jsonp service
[EnableClientAccess(RequiresSecureEndpoint = false)]
public class PPolJsonService : LinqToEntitiesDomainService<PPolAdvEntities>
{
public IQueryable<QuestionEntity> GetCompleteSurvey()
{
............
}
}
javascript code
function (data) {
var Params = {};
Params.type = 'GET';
Params.url = 'http://127.0.0.1:81/PPolSilverlight-Web-Services-PPolJsonService.svc/JSONP/GetCompleteSurvey;
Params.dataType = 'jsonp';
Params.data = { data:'somedata'};
Params.success = function (data) { };
Params.jsonpCallback = "ppolv2"
$.ajax(Params);
});
In web.config file my setting is <authentication mode="Forms">
İf I set <authentication mode="None"> I am be able to solve all problems with chrome. But the rest of the application needs authentication. So thats why I have to use it as "mode=Forms". And as you see my service does not use authentication so,
Why I am getting this error and is there any solution for it?
Note:
By the way I have other settings in web.config like
<webHttpEndpoint>
<standardEndpoint crossDomainScriptAccessEnabled="true"
automaticFormatSelectionEnabled="true"/>
</webHttpEndpoint>
or these in clientaccesspolicy.xml
<?xml version="1.0" encoding="utf-8"?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="*">
<domain uri="http://*"/>
<domain uri="https://*" />
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
but none of them is helping me.
Thanks in advance.
Hi Try to add this line to your web.config files. It enables Cross-domain Ajax Requests.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
I haven't test it enough but I guess I found a solution.
İf you use secure endpoint in your application and if you don't need to use secure endpoint for jsonp services,
you can add requireSSL="true" in
<authentication mode="Forms">
<forms name=".PPolSilverlight_ASPXAUTH" timeout="2880" requireSSL="true" />
</authentication>
with this small piece of code your unsecure jsonp services will be able to work without authentication.

redirect from application(on root domain level) to subapplication

My hosting supports only web.config IIS configuration. I want to redirect my
http://domain -> http://domain/X
and here is my try
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpRedirect enabled="true" destination="http://domain/X/" />
</system.webServer>
</configuration>
it works, but the trouble it works for all sites and when I already on http://domain/X/ it still working so I'm getting recursion http://domain/X/X/X/X/X/X/X etc...
Temporary solution is to put
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpRedirect enabled="false" />
</system.webServer>
</configuration>
into http://domain/X and http://domain/Y etc... but when I go to the http://domain/Y/Z it anyways redirects me to http://domain/X/Z/ (so hell I don't really want to put this in any folder)
So I think I need to fix first redirection (Somehow) to make it works only for http://domain/
thank you.
You can try setting childOnly attribute - as per documentation, this would redirect only if the file name is present in the url. So only urls of form http://domain/<file name> would get redirected to http://domain/X/<file name> and that should solve your issue. For redirecting http://domain/, you may use a default document redirecting to http://domain/X.
You may also look at URL Rewrite module - see http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/ (but of course, it will not issue HTTP redirects if that is the need)

Is it possible to specify an automatic configuration proxy in web.config?

I'd like the server web.config configuration to match the client as closely as possible. All clients use a proxy auto-configuration script.
Is there any way to specify this script file in web.config?
Yes
Directly under <configuration>:
<system.net>
<defaultProxy enabled="true" useDefaultCredentials="true">
<proxy scriptLocation="--- your script location here ---" bypassonlocal="True" />
</defaultProxy>
</system.net>

Resources