John Bristowe explains (from personal experience) what it takes to really learn and understand all that goes on through the pipe in .NET – WSE, Web Services, etc etc. I have always been impressed with John’s scope of knowledge on this topic and having only scratched the surface of some of that stuff myself, have always wondered how he does it. He claims it’s lots of hard works. That I agree with, however, I think his brain has something to do with it, too!
Daily Archives: February 17, 2004
Getting Directory names from your web applications
I had a problem today with some suddenly altered write permissions on my client’s webserver. So I needed to create a new directory that I had total ownership of to work with. That meant trying once again to remember how to use the darned MapPath, etc. It’s one of those things you use once a year or so…
I wrote a little web service utility that I can now shove into any web application (or web service application) on my webserver which returns
System.IO.Directory.GetCurrentDirectory
System.IO.Directory.GetDirectoryRoot(GetCurrentDirectory)
System.IO.Directory.Directory.GetParent(Directory.GetCurrentDirectory).FullName
Web.Services.WebService.Server.MapPath(“”)
Web.Services.WebServiceServer.MapPath(“\”)
From the Application Directory and the BIN folder.
It returns a string that has line returns in it (though if you just run this directly in i.e. you’ll only get one long string).
I packaged these up into a zip file here if anyone wants to use it.
Note – I would not recommend LEAVING them on your webserver after you get the needed info, since they are not at all secure and expose a little more info than you might want to!!
Of course the most fun is giving something a name. I called it What’s My Dir?.
The zip has the tiny source code (an asmx file and a vb file) as well as the compiled dll if you just want to use it, plus a little readme.txt file to be sure you copy the files in the right place (for those unsure)
If you are using .NET 1.1 be sure that this is in your web.config:
<webServices>
<protocols>
<add name=”HttpGet” />
<add name=”HttpPost” />
< FONT>protocols>
< FONT>webServices>
inside of the
I just whipped this together for myself and it does the trick, so you know … no warranties, guarantees, etc.
Ted Neward, Christian Weyer, Scott Guthrie, Rob Howard, Don Kiely, Markus Egger and MORE
Sounds like TechEd, but it’s not! It’s DevTeach, Montreal, Quebec in June. I am a huge fan of this conference for a number of reasons. 1) It’s less than 2 hours from my house 2) it’s very inexpensive 3) the canadian exchange makes it even LESS expensive 4) awesome speakers 5) gobs of great .NET content (and SQL and FoxPro) 6) FUN event – not too huge so it’s very rub your elbows -y.
With Early Bird special before March 31, registration ends up being only $570 US for the 3 days. If you live in the northeast, you should definitely check this out.
Werner Vogels does a serious analysis of ws-events, ws-eventing and ws-notification
Here. On the surface, these specs would seem to be similar by definition (just competitive), but Werner explains that this is not the case and then goes in to a analysis/comparisonof the three. These specs are all still “young”. Werner is one of most knowledgable people out there when it comes to distributed computing so read and learn!