Geeks With Blogs
Robert's Sysadmin Blog Unraveling the datacenter one fibre at a time

Robin Curry has posted a follow-up on his PostToSpaces webservice, here he explains how to get Blogjet working with it.

http://www.robincurry.org/blog/default,date,2005-06-29.aspx

Me and Dmitry Chestnykh (creator of Blogjet)  also spent some time on this, and got it woking also, as I had posted about earlier.

Personally, I had never really installed a webservice manually before, and it took me some doing to figure out all the steps, so I thought the community might be served if I wrote my own little tutorial, that included getting Robin’s webservice installed, in my case on IIS6. Thats not to say one could not install this webservice on Apache or something, its just that I didn’t, and couldn’t tell you how to

So here we go.

————————————————

How to setup IIS, PostToSpaces and Blogjet to post to MSN Spaces

Prerequisits:

  • Your own IIS6 webserver, which is accesable from the internet
  • Blogjet
  • An MSN Spaces Account
  • Robin’s PostToSpaces webservice (download here or here)
  • An SMTP server to post mail though
  • Basic Knowledge on how to configure IIS and Blogjet (and possibly your mailserver)

Apart from the above stated, this guide makes no assumptions about what you do or do not already know about setting up a webservice.

A Note on security: I cannot gurantee the safety of the PostToSpaces webservice, I did not make it, and I am not a developer.
The instructions below will enable you to use it, but the setup enables annoymous acess to the webservice. Any exploitable fault in the PostToSpaces webservice could lead to system compromise, but this is of course true of anything you run that is accesable from the internet.

1. Set up your MSN Spaces account to recieve SMTP email

On the page where you set this up, MSN Spaces asks that you fill in a source email adress and a secret word. These are important to note, as you will need to fill in this email adress in the web service, and you will be using your secret word in Blogjet

PostToSpaces10

You can at this point, use any email client to test post to MSN Spaces. Make sure this already works before proceding.

2. Installing the webservice on your IIS Server

In this example I have an empty IIS enviroment on a server called DC1 (its a virtual machine for the purposes of this guide), and I will be using the default website, which is accesable from the Internet on www.mywebserver.com

Make sure you have the ASP.NET web service extention enabled in IIS

First, copy the PostToSpaces webservice to a folder, I have used a folder within the default IIS webcontent location, but this is up to you.

PostToSpaces5

Make sure the folder has the ACL entries as shown below. Note that we will be giving Annonymous access to this folder,, using the IUSR_DC1 account.  that means that anyone on the internet can access the PostToSpaces webservice and possibly read this folder, but don’t worry, it doesn’t mean that they will be able to post to your Space, or their own for that matter. More on that later.

PostToSpaces7

Now we need to create a virtual folder in IIS.

PostToSpaces1

PostToSpaces2

Point it to the location of where you copied the web service. Note that web.config is at the root of this folder.

PostToSpaces3

PostToSpaces4

PostToSpaces8

Now open web.config with notepad. Robin has already annotated some of it.

PostToSpaces6

Note the 2 lines at the top, inside the <appsettings> section

On the second line, fill in the email adres you use to mail to MSN spaces, so thats the one you entered in the MSN Spaces E-mail publishing settings. ( add key="SendFromAddress" value="myadress@isp.com )

On the first line, you will need to fill in an SMTP server that you can post though. This might be your ISP’s mail server, or your own, if you are running it. For this guide, I am running my own mail server on the same machine as ISS, so I leave this line as it is, pointing to Localhost.

That should do it for the server setup. You can now try accessing the page both from the server itself, aswell as from the outside internet.

The URL you use for this is rather specific. In this example, and locally from this example server;
Internal: http://localhost/PostToSpaces/blogger.aspx
External: http://www.mywebserver.com/PostToSpaces/blogger.aspx

You should see the page shown below.

PostToSpaces9

As you can see, PostToSpaces is emulating the MetaWeblogAPI interface. This page and the code in it, is requested by any application that can post to blogs using the MetaWeblogAPI, such as Blogjet. But other applications like, for instance W.Blogger, may well work also.

Another thing to notice, is that while the page IIS seems to be serving is blogger.aspx, this page doesnt actually exist as a file in your PostToSpaces folder.
If you look in the web.config file, you can see that this is achieved with a custom handler. The page is being served from the PostToSpaces.dll file in the /BIN folder.



Special instructions for Exchange 2003:
If you are going to post through a mailserver running Exchange 2003, you need to set up the SMTP to accept SMTP relay from the server you are running the PostToSpaces webservice on. Relaying is turned off by default. You can specify an email adress of the IIS server on which you are running the PostToSpaces webservice, or if its the same machine as Exchange, you fill in the localhost adress; 127.0.0.1
Bear in mind that this may be a security risk. If you IIS server is ever compromised, it can start using your Exchange server as an open mail relay.

PostToSpaces11

 

4. Setting up Blogjet

Now we have confirmed that the webservice is functioning, we can set up Blogjet to post to the PostToSpaces webservice on our webserver.

Setup a new account in Blogjet, and fill in the fields as shown below. Looks obvious doesn’t it?

PostToSpaces12

In the Username and Password screen, we have to pay attention.

Your Username is your MSN Spaces username, so in this example myusername, cause this person has an MSN Spaces url that goes like this: http://spaces.msn.com/members/myusername

Your Password is the Secret Word you filled in, in your MSN Spaces E-Mail Publishing screen.

PostToSpaces13

On the File Upload Configuration screen, Just click next.

Name this account whatever you want. You dont need to fill in the Adress of the blog page.

And we are done.

Try out a test post.

For troubleshooting, try to visualise what the route of communication is here:

Blogjet contacts the PostToSpaces service on your webserver, thinking it talks MetaWeblog, and uploads a set of credentials (username and password).

PostToSpaces takes all that data, and constructs an email message. The to field is populated with the username/password blogjet gave it, resulting in, using our example: myusername.mysecret@spaces.msn.com

It then populated the from field in the email, with the adress you specified in the web.config file on your webserver, in our example: myadress@isp.com

This is the reason you need your own webserver to do this. This is also the reason no one else can use your hosted PostToSpaces service. An email generated by PostToSpaces will only be accepted by MSN spaces if the above to email adresses are valid, according to the data you provided in the E-Mail publishing page on your MSN Spaces configuration.

PostToSpaces then fires of a connection to the SMTP server that you specify in the web.config folder.

It then picks up the body of the message Blogjet is sending it.

If this part of the process fails, Blogjet will return an error like: “Could Not Access ‘CDO.Message’ object”. This is cause PostToSpaces will only accept the body of the Blogjet post at the moment it can reliably connect to the SMTP server. If it cant, it will deny Blogjet the oppertunity to send the main text.

If the connection was established correctly, and a the email message is contructed, the service fires off the email and sends an OK back to Blogjet.

————————-

So…  I hope that was usefull for you

Feel free to comment on the guide in the comment section of this post.
Comments about the PostToSpaces webservice should be directed at Robin Curry, his blog is here, and his posts so far relating to this application are to be found here and here.


 

Posted on Saturday, July 16, 2005 10:26 PM | Back to top


Comments on this post: How to setup IIS, PostToSpaces and Blogjet to post to MSN Spaces

# re: How to setup IIS, PostToSpaces and Blogjet to post to MSN Spaces
Requesting Gravatar...
Unfortunately, I was unable to reproduce that. After a couple of hours of investigating :(
Left by max on Feb 15, 2006 1:38 PM

# re: How to setup IIS, PostToSpaces and Blogjet to post to MSN Spaces
Requesting Gravatar...
nice to hear you again dude.
Left by mp3 blog on Mar 27, 2006 11:06 AM

# re: How to setup IIS, PostToSpaces and Blogjet to post to MSN Spaces
Requesting Gravatar...
thanks
http://geekswithblogs.net/jemimus/archive/2005/07/16/47180.aspx
Left by kral on Sep 24, 2007 6:58 PM

# www.r10.net küresel ısınmaya hayır seo yarısması
Requesting Gravatar...
thank you thank you thank you thank you
Left by seo yarısması on Dec 08, 2007 12:49 PM

# re: How to setup IIS, PostToSpaces and Blogjet to post to MSN Spaces
Requesting Gravatar...
Unfortunately, I was unable to reproduce that. After a couple of hours of investigating :(
Left by Free samples on Apr 02, 2008 4:14 PM

# re: How to setup IIS, PostToSpaces and Blogjet to post to MSN Spaces
Requesting Gravatar...
thank you
Left by SesliSohbet SesliChat on Aug 18, 2008 2:21 AM

# re: How to setup IIS, PostToSpaces and Blogjet to post to MSN Spaces
Requesting Gravatar...
thanks admin
information is the most beautiful treasures
very good blog..
Left by 3d oyunlar on Dec 21, 2009 3:36 PM

# re: How to setup IIS, PostToSpaces and Blogjet to post to MSN Spaces
Requesting Gravatar...
thanks admin exciting blog
information is the most beautiful treasures
Left by sikiş on Dec 24, 2009 2:39 PM

# re: How to setup IIS, PostToSpaces and Blogjet to post to MSN Spaces
Requesting Gravatar...
thanks you
You will have to crawl very nice...
If the connection was established correctly, and a the email message is contructed, the service fires off the email and sends an OK back to Blogjet.
Left by sikiş on Dec 26, 2009 5:50 PM

# re: How to setup IIS, PostToSpaces and Blogjet to post to MSN Spaces
Requesting Gravatar...
thanks you
You will have to crawl very nice,owe you gratitude..
Left by sikiş on Jan 29, 2010 5:15 PM

# re: How to setup IIS, PostToSpaces and Blogjet to post to MSN Spaces
Requesting Gravatar...
YS0302RIf winter comes, can spring be far behind?If you doubt yourself, then indeed you stand on shaky designer purses ground.If you would go up high, then use your own legs ! Do not let yourselves carried aloft; do not seat yourselves on other people's backs and heads.It is at our mother's discount designer bags on sale knee that we acquire our noblest and truest and highest, but there is seldom any money in them. Living without an aim is like sailing without a compass.The ideals which have lighted my way, and time after time have given me new courage to face life cheerfully 19 have been kindness, beauty and truth.The important louis vuitton 2009 thing in life is to have a great aim, and the determination to attain it.
Left by handbags on Mar 30, 2010 1:20 AM

Your comment:
 (will show your gravatar)


Copyright © Robert Kloosterhuis | Powered by: GeeksWithBlogs.net