|
Home > Archive > BizTalk Server General > December 2004 > SharePoint Adapter with SSL
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
SharePoint Adapter with SSL
|
|
| Rajesh Sharma 2004-12-01, 5:51 pm |
| When I use SharePoint adapter with http://..., the adapter works fine.
However, when I use https://... I get an error "Underlying connection was
closed. Unexpected Error." The url works fine when used from internet
explorer. I debuged the adapter code. I can see it throw exception when it
makes call to the web service proxy.
Has anyone used sharepoint adapter with SSL successfully or unsuccessfully,
please send your comments. Your help to fix the problem will be greatly
appreciated.
Thanks,
| |
| Adrian Hamza [MSFT] 2004-12-02, 8:48 pm |
| There is a bug in the code, you can probably fix it yourself.
The problem is in the SharePoint
Adapter\Runtime\SharePoint\SharePointHel
per.cs file, the methods included
below. As you can see the HTTP is hard coded in the code so when you use
HTTPS, the URL of the web service will contain HTTP instead of HTTPS. You
can probably replace the whole GetBaseURL method with a method that looks
more or less like this (the code below is not tested, you'll have to play
with it to make sure it works, but it should be pretty close to what you
need).
internal static string GetBaseURL(string site, AdapterState state)
{
string url = String.Empty;
Uri siteUri = new Uri(site);
url = siteUri.GetLeftPart(UriPartial.Authority);
return url;
}
////////////////////////////////////////////////////////////////////////////
////////
internal static string BuildWebServiceURL(string site, AdapterState state)
{
// Called too many times
//Helper.Debug("Entering BuildWebServiceURL", state);
// Build the URL
string url = GetBaseURL(site, state) + "/_vti_bin/WSSDocLibService.asmx";
Helper.Debug("Web service URL = " + url, state);
return url;
}
internal static string GetBaseURL(string site, AdapterState state)
{
// Called too many times
//Helper.Debug("Entering GetBaseURL", state);
string url = String.Empty;
// Get the server from the the site URL
int index = site.IndexOf("//") + 2;
if (index > 0)
site = site.Substring(index, site.Length - index);
index = site.IndexOf("/");
if (index > 0)
site = site.Substring(0, index);
// Called too many times
//Helper.Debug("Server name = " + site, state);
// Build the URL
url = "http://" + site;
Helper.Debug("Base URL = " + url, state);
return url;
}
--------------------[vbcol=seagreen]
<RajeshSharma@discussions.microsoft.com>[vbcol=seagreen]
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA0
3.phx.gbl[vbcol=seagreen]
it[vbcol=seagreen]
unsuccessfully,[vbcol=seagreen]
This posting is provided "AS IS" with no warranties, and confers no rights.
EBusiness Server Team
|
|
|
|
|