473,765 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Self hosting WebService with SSL transport layer security

Hi!

I'm trying to get a WebService running (self hosting, without IIS) that
uses SSL and loads the SSL key/certificate from a file (without using
httpcfg.exe).

I have a running service and netstat shows a listening https interface,
but I can't access the service or the wsdl meta data.

Any ideas, what's going wrong here (see code below)?

Regards,

Tobias

That's what I've done so far:

class Program
{
static void Main(string[] args)
{
ServiceHost host = new ServiceHost(typ eof(SoapService ));
host.Credential s.ServiceCertif icate.Certifica te =
new X509Certificate 2("Server.pfx ", "");
host.Open();
Console.WriteLi ne("Service is running....");
Console.ReadLin e();
}
}

<system.service Model>
<bindings>
<basicHttpBindi ng>
<binding name="bindingWi thTransportSecu rity">
<security mode="Transport ">
<transport clientCredentia lType="None" />
</security>
</binding>
</basicHttpBindin g>
</bindings>
<behaviors>
<serviceBehavio rs>
<behavior name="SoapServi ceBehavior">
<serviceMetadat a httpsGetEnabled ="true" />
<serviceDebug includeExceptio nDetailInFaults ="true" />
</behavior>
</serviceBehavior s>
</behaviors>
<services>
<service behaviorConfigu ration="SoapSer viceBehavior"
name="ServiceTe st.SoapService" >
<endpoint address=""
binding="basicH ttpBinding"
bindingConfigur ation="bindingW ithTransportSec urity"
contract="Servi ceTest.ISoapSer vice" />
<endpoint address="mex"
binding="mexHtt psBinding"
contract="IMeta dataExchange" />
<host>
<baseAddresse s>
<add baseAddress="ht tps://localhost/servicetest" />
</baseAddresses>
</host>
</service>
</services>
</system.serviceM odel>

The certificate is created this way:

makecert -r -pe -n "CN=MYSERVE R" -b 01/01/2007 -e 01/01/2010 -sky
exchange Server.cer -sv Server.pvk
pvk2pfx.exe -pvk Server.pvk -spc Server.cer -pfx Server.pfx
Jul 25 '07 #1
1 3084
I'm trying to get a WebService running (self hosting, without IIS) that
uses SSL and loads the SSL key/certificate from a file (without using
httpcfg.exe).
No ideas? Anyone?

Tobias
Jul 30 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
357
by: DraguVaso | last post by:
Hi, I need to write a VB.NET-application (Windows Forms) that may have a part of it (re-)implemented as a Webpage for the customers. I think it can be usefull to create a business Layer with Remoting or a XML Webservice, and than write my Windows Forms application that uses it. and than maybe in the future the Webclient. I have jsut one question: I hate the performance/speed-problems with
1
3289
by: Paul NGPC | last post by:
Hi folks This is a challenging and interesting topic. Need HELP on this, would be good if some tips/techniques can be given for the topic. Using VB.NET client to connect to JavaWebserver. Don't know how to use the 2-way SSL to communicate and make the SSL handshake process( at Transport level https://) transparent. Any .NET classes to make all the 2-way SSL
13
12958
by: ALI-R | last post by:
I know how to authenticate to a webservice using either of these ways(Assuming that rService represents the webservice): 1) rService.Credentials = new System.Net.NetworkCredential("username","password","domainName"); 2)rService.Credentials = System.Net.CredentialCache.DefaultCredentials; My question is that is there a way to authenticate to a user using WindowsIdentity ???
0
2794
by: John | last post by:
We are doing integration with an AS400 running websphere - webservices. When the customer (AS400) calls the .Net webservice the customers java code (every other request or so) throws the following exception. We are both researching the possible cause of this. Any suggestions on the .Net side for resolving this would be helpful. John java.io.IOException: Broken pipe. at java.lang.Throwable.<init>(Throwable.java:195)
6
1823
by: jhooper71 | last post by:
It's been recommended to me to use a webservice and XML for the data manipulation layer for web applications in .NET 1.1. I was thinking I could use the web service to extend the database interface to a Smart Phone/Treo solution eventually. I would like to create our apps in the most current development environment but, do I abandon the webservice-->Dataset--> XML -->Http-->XML --> dataset -->gridview methodology? Is there a better...
2
1305
by: news.demon.nl | last post by:
Hi, I hope someone can give me some advice on which form of security i can use best in this scenario: I have a free application that everbody on the internet can download. It calls a webservice retrieve it's data. Currently it's not secured, so anybody can use it. I want to secure it, but the guy who owns the server does not want to make
3
1097
by: UJ | last post by:
Is there a way to tell when a webservice is called whether it came in through HTTP or HTTPS ? TIA - Jeff.
0
2389
by: TraceyAnnison | last post by:
I wonder if you can help me - I'm new to this, and working in a project that has already been configured to work with Axis. We have a Java project built with the Spring framework, in order to provide webservices for access via SOAP. As I understand it (ie not very well!) Axis works to accept these SOAP messages from the client and transform them into calls on our Java methods, and do the reverse with the responses - cool! Which is excellent,...
0
1148
by: develop12 | last post by:
Does any one know how to attach a client certificate in WSE 3.0 for transport layer security? For example HttpWebReques has ClientCertificate Property and you can attach the client cert. I'm trying to have a generic proxy for calling multiple web services and so don't want to use WebServiceClientProtocol since that is tied to a web method using soapdocumentmethodattribute. I want to use SoapClient (Microsoft.Web.Services3).... Any...
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9398
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9951
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9832
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8831
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7375
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
3924
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2805
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.