Laumania.net

A Silverlight developers blog

Remove WSDL from webservices

I have thought about this many times, but never had the time to make the research to find an solution.

The problem is that if you put an .asmx (web service) on a web server, it will as the default, be able to show the WSDL information to everybody. This isn’t of cause very good, as anyone then easily can see all methods in the web service. Of cause a web service is typically accessible from the public, as this is where it’s purpose to be used from. Anyways, it’s not good to show the WSDL, so I wanted to remove it.

All you need to do, is to add these lines to your web.config:

 

<? xmlversion="1.0" encoding="utf-8"?>
<configuration>
<system.web>
                <webServices>      
                     <protocols>        
                           <remove name="Documentation"/>       
                     </protocols>  
              </webServices>
</system.web>
</configuration>

 

Read the rest of the article from where I found this here: http://www.15seconds.com/Issue/040609.htm



        
Posted: Nov 22 2008, 23:20 by Mads | Comments (0) RSS comment feed |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: .NET | ASP.NET

Blogging from LIVE Writer

I have now hear about the ability to blog from LIVE writer on the blog engine.net as I’m using, and today I decided to give it a try.

It actually works pretty simple and easy.

  1. Get LIVE writer from http://windowslivewriter.spaces.live.com/ (I use the beta)
  2. Install it – Note that it will install a beta version of MSN Messenger, which I couldn’t find a way to avoid.
  3. LIVE writer will ask for you blog url, username and password.
  4. LIVE writer den get some information from your blog and after a while, you are ready to start blogging on your blog from a desktop application instead of web.

You may think - “Why should I blog from a desktop application, when I can blog from the web?”. Well, I don’t really need to blog from a desktop application, but I most say it actually seems pretty sweet and easy as I’m sitting here writing this first blog, but back to the question. People that isn’t that much familiar with the web, maybe find it “hard” to blog from the administration via the web and maybe find it easier in a desktop application, as it is more familiar to them.

Let’s try some feature, let’s insert a picture:

07072007023

It opens up the file browser on my PC here, and not my image folder at my blog. And now that I have inserted the image and selected it, I have some different kinds of possibilities.

image

Oh my god, this is nice! I just took at screenshot as I’m writing this blog, and just CTRL+V and bang! It’s in the post. That is actually VERY handy :)

Let’s try that again so I can show you what else I can insert:

image

Wow, I can crop a screenshot too! Sweet. Hmm it’s in Danish, damn, sorry for all the English speaking people out there.

Well, lets’ try inserting a Map:

Kortbillede

Also seem to work fine.

That most be all for now, it actually seems to be pretty handy anyway, as a desktop application add much more features than the web based administration.

Now let me publish this post and see if all the images etc. get uploaded to the web too.

Posted: Nov 22 2008, 13:49 by Mads | Comments (0) RSS comment feed |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: BlogEngine.NET

Animation Along a Path for Silverlight

Sometime ago I posted a topic on Silverlight.net about how to get an control to follow a Path. This resulted in many good suggestions, but not actually what I wanted.

Today I then saw this on my RSS reader:  Animation Along a Path for Silverlight, which sounded exactly like what I was looking for. I just wanted to give you, readers, an headsup on this one. I haven't actually tried this out yet, but it looks very promissing.

Enjoy!

Posted: Nov 10 2008, 20:29 by Mads | Comments (0) RSS comment feed |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Silverlight

Silverlight Tools RTW released

Oh my god, it's the big release day today. Finally the RTW version of the Silverlight Tools were released. To be honest, I can't see the big changes when looking at the feature list, but there must be something, just not that clear I think.

You can see more here at this post: http://silverlight.net/blogs/msnow/archive/2008/10/28/silverlight-tools-rtw-released.aspx

Posted: Oct 28 2008, 22:22 by Mads | Comments (0) RSS comment feed |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Silverlight

Fullscreen samples for Silverlight

I have now been searching for some good fullscreen Silverlight 2.0 final release samples, but with out luck. Therefore I created this thread on silverlight.net to find out. I got good responses and made this little project with two ways of doing it.

You can download the project here as a zip file

The project includes two ways of doing "fullscreen" applications.

You choose between the two different ways by commenting in the one you like in the App.xaml.cs file.

[code:c#]

this.RootVisual = new Fullscreen1();
//this.RootVisual = new Fullscreen2();

[/code]

Fullscreen1 - Shows how to make an application fullscreen/browser by setting "styles" on the controls to make them resize properly.
Fullscreen2 - Shows how to scale up your application by code.

It's two different ways of doing it as I see it and is used in different scenarios.
The way it's done in Fullscreen1 will typically be used for "application", meaning an application with a "static" layout.
The way it's done in Fullscreen2 is more for "games", as it scales the hole application up, which can constain lots of different dynamic controls at the time.
Well, this is just the way I see it at the moment please let me know if you think otherwise, I could be wrong. Laughing

Posted: Oct 28 2008, 22:01 by Mads | Comments (0) RSS comment feed |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Silverlight

Silverlight Toolkit released

The Silverlight Toolkit has been released at Codeplex.com. This kit is similar to the Ajax Control Toolkit for ASP.NET, as it extends existing controls and add totally new ones to the framework.

Get Silverlight Toolkit from here

See some samples of the charts here

Or here to see samples of controls

Posted: Oct 28 2008, 20:08 by Mads | Comments (0) RSS comment feed |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Silverlight

Bubbles - Source released

I have cleaned up the source for Bubbles a little and am now releasing it for you to enjoy. The source is released as-is, and some encryption/security code have been removed to keep my hiscore as correct as possible.

Get the source from here

 

Posted: Oct 22 2008, 20:51 by Mads | Comments (0) RSS comment feed |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Silverlight

Silverlight game "Bubbles" - on www.silverlight.net

This Wednesday I submitted my first Silverlight 2.0 (final release) game to Silverlight.net late at night. Already the next day it was up there, great! Laughing 

The basic concept in the game is to "pop" as many bubbles as you can in 30 seconds, pretty simple. The best thing is that it also has a hi-score, which means that you can fight to become the "Bubble Master aka #1". The game is a complete rewrite of a similar game I did in Beta 1 and Beta 2.

You can play the game directly on my site here: http://silverlight.laumania.net/bubbles/

Or you can get to it through Silverlight.net here: http://silverlight.net/community/gallerydetail.aspx?cat=sl2

I'm planing to release the source code for it, I just wanted to add some minor fixes and changes to the game before that. So you should be able to find the source on my site here, and on Silverlight.net in some time.

Enjoy!

Posted: Oct 17 2008, 17:02 by Mads | Comments (0) RSS comment feed |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Silverlight

Silverlight 2 will be available Tuesday, Oct. 14 2008

Wow, I'm wasn't expecting it until later this month! But this is great news! :)

I got the info from this link, see at the bottom: http://www.microsoft.com/presspass/press/2008/oct08/10-13Silverlight2PR.mspx

Credits goes to Andy Beaulieu as I saw it on his post: http://www.andybeaulieu.com/Default.aspx?tabid=67&EntryID=121

 Silverlight 2.0 is here, and we are all happy!

 Update: Now the tools and runtime is downloadable from http://silverlight.net/GetStarted/

Posted: Oct 13 2008, 20:36 by Mads | Comments (0) RSS comment feed |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Silverlight

Avoid "Click to activate and use this control" with Silverlight in IE

This little problem have hunted me for sometime now, I just never took the time to find a solution until now.

Let me sum up the problem.

When you deploy a silverlight application using the "ASP.NET 3.5" way by inserting a ScripManager and a SilverlightControl to embed your app, all seems to work great! The SL app runs in the browser with out the user having to do anything.

But what if you are going to deploy your app to a ASP.NET 1.1, ASP.NET 2.0, ASP, PHP, JSP or what ever site? If you need to do this, you can use the normal <object> tag to insert your application. (See the .html file generated in the Web Application Project when creating a Silverlight Application in Silverlight Beta 2). This also works great, but in IE I get an irritating "Click to activate and use this control" with an ungly border around my SL app.

What causes this, and how to we work around it?

Well, I found out that this is due to some "problem" in IE and it should be fixed in an update to IE from April 2008. See the post here.

I discovered that the virtual machine that I use to code in, where not updating automatically, which is why I see the problem.

We could all just lean back, and think "Ok, everybody updates, so there is no problem". I think we are wrong here. I think "many" people for some reason don't update their windows on a regular basis. The reasons for this could be many and is not a part of this post.

To have all my users have the best experience, I wanted to find a way where it worked no mather if you have an updated or an old version of IE. I googled it and found some samples, but non of them worked out of the box, and dome didn't had a proper fall back handling.

Therefore I created my own. All you need for this is the HTML and the Silverlight.js file, which is located similar to this: C:\Program Files\Microsoft SDKs\Silverlight\v2.0\Tools

 

[code:html]


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title></title>
<script src="Silverlight.js" type="text/javascript"></script>
</head>
<body>
<div id="SilverlightContent">
Silverlight not installed...please do so :)
</div>
<script language="javascript" type="text/javascript">
var parentElement = document.getElementById('SilverlightContent');
var altHTML = parentElement.innerHTML;
Silverlight.createObject(
"ClientBin/DeployTest.xap", // Source property value.
parentElement, // DOM reference to hosting DIV tag.
"myPlugin", // Unique plug-in ID value.
{ // Plug-in properties.
width:'1024', // Width of rectangular region of plug-in in pixels.
height:'530', // Height of rectangular region of plug-in in pixels.
//background:'white', // Background color of plug-in.
//isWindowless:'false', // Determines whether to display plug-in in windowless mode.
//framerate:'24', // MaxFrameRate property value.
version:'2.0', // Silverlight version.
alt: altHTML // Alternate HTML to display if Silveright is not installed
},
{
onError:null, // OnError property value -- event-handler function name.
onLoad:null // OnLoad property value -- event-handler function name.
},
null, // initParams -- user-settable string for information passing.
null);
</script>
</body>


/html>


 [/code]
Enjoy! 
Posted: Oct 11 2008, 13:17 by Mads | Comments (0) RSS comment feed |
  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Filed under: Silverlight