Wednesday, December 22, 2010

Request format is unrecognized for URL unexpectedly ending exception in web service.

Recently I was getting error when I am calling web service using Java script. I searching on net and debugging I have found following things.

Any web service support three kinds of protocol HttpGet,HttpPost and SOAP. In framework 1.0 it was enabled by default but after 1.0 framework it will not be enabled by default due to security issues and WS-Specifications. So we have to enabled them via putting configuration settings in web.config. Here is the code for that.

<configuration>
<system.web>
<webservices>
<protocols>
<add name="HttpGet"></add>
<add name="HttpPost"></add>
</protocols>
</webservices>
</system.web>
</configuration>
Hope this will help you. Stay tuned for more. Till that Happy programming!!!.

Technorati Tags: ,,,

Shout it
Share:
Monday, December 20, 2010

ASP.NET MVC 3 RC2 Razor- Syntax Intellisense in view.

Microsoft has recently launched Razor view engine with ASP.NET MVC RC2. It’s going to be promising one. There are lots of features bundled with this view engine. But in earlier version of ASP.NET 3 MVC. We were are not having Synatx intellisense provided for asp.net mvc views in Visual Studio 2010. So either we have to depend third party tools like Resharper or we have to manage it without intellisesnse. But with ASP.NET MVC 3 RC2 Microsoft has moved one step forward and its providing syntax intellisense without installing any third party addons in Visual Studio. Here is example of it.

Syntax
Hope you liked it. Stay tuned for more.. Happy Programming..

Shout it
Share:
Sunday, December 19, 2010

ASP.NET 4.0 Script Manager Enhancement Part-2 AjaxFrameworkMode Property

This will be a second part of ASP.NET 4.0 Script Manager enhancement. In this post I am going to explain about AjaxFrameworkMode Property. In Earlier asp.net version of script manager it will load entire Microsoft Ajax library whether its required or not. In asp.net 4.0 script manager we are having AjaxFrameMode property where we can set mode as explicit and we add only js that are required or not.

There are three values of AjaxFrameworkMode properties supported in asp.net

  1. Enabled- Specified that ASP.NET 4.0 scriptmanager will automatically load MicrosoftAjax.js file which is core element of Microsoft Ajax library.
  2. Disabled- This Specified that Microsoft Ajax Script features are disabled and script manager will not have any reference to any javascript files.
  3. Explicit- Specifies that you will explicitly include script references to individual framework core script file that your page requires, and that you will include references to the dependencies that each script file requires.

So here is example if require only Microsoftcore.js then we can use this explicitly without loading other unnecessary files.

<asp:ScriptManager ID="myScirptManager" AjaxFrameworkMode="Explicit" runat="server">

<Scripts>
<asp:ScriptReference Name="MicrosoftAjaxCore.js" />

</Scripts>
</asp:ScriptManager>


Hope this will help you increase your performance. Stay tuned for more..

Shout it
Share:

ASP.NET 4.0- ScriptManager Enhancement Part-I- Enable CDN Property.

ASP.NET 4.0 has been a great step forward to the programming. Microsoft has done incredible job with the performance. One of them is Enable CDN Property in asp.net 4.0 Script Manager. Let's explore it in details. As you all know that Microsoft is Providing Content Delivery Network for all the Ajax script that is used by Microsoft Ajax and All version of Jquery and JQuery UI. This Script manager enable cdn property will fetch all the script from that CDN Automatically. Developer don't have to worry about. As you know new generation browsers are like IE8 and Firefox are creating a new thread of each JS or CSS include in Webpage if they are coming from the CDN(Content Delivery Network). So this will be a great measure step towards it. Let's take an example to explore the things. I am taking one simple example which will demonstrate use of this. I am tasking a Textbox and Button. On the button click event it will update textbox's text property. I am going to use update panel to use Microsoft Ajax. For that first I need a script manager so I have taken script manager and and I have set its property EnalbleCdn=true. So without posting back whole it post back only that portion which are required. I have putted textbox in content template of update panel and I have created asynchronous post back trigger for button click event. So it will update the textbox text without creating post back. Let's how I have created. Following are Simple HTML for that.
<body>
<form id="form1" runat="server">
<div>

<asp:ScriptManager ID="cdnScriptManager" EnableCdn="true" runat="server">
</asp:ScriptManager>  

<asp:UpdatePanel ID="cdnUpdatePanel" runat="server">
<ContentTemplate>
<asp:TextBox ID="txtHelloWorld" runat="server"></asp:TextBox>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnHelloWorld" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<BR />
<asp:Button ID="btnHelloWorld" runat="server" onclick="btnHelloWorld_Click"  Text="Hello World!!"/>


</div>
</form>
</body>

Now I am going to create a click event which will change textbox text’. Following is a code for that.

protected void btnHelloWorld_Click(object sender, EventArgs e)
{
txtHelloWorld.Text = "Hello World";
}

That’s it Let’s run that with Ctrl+ F5 and It will look in firefox browser like following.


ScriptManager4.0, ASP.NET 4.0 Enhacement


Now Let’s see its view source and see how it’s look like. Following is a screenshot of view source.


ViewSource

As you can see its fetching all the JS from Microsoft Ajax Content delivery network. Isn’t that great. You just to have enable CDN Property =true and It will do rest of Job. That’s power of asp.net 4.0. Hope you liked it. Stay tuned for more in Part 2.
Shout it
Share:
Saturday, December 18, 2010

DotNetQuiz 2011 on BeyondRelational.com- Want to be quiz master or participant?

Test your knowledge with 31 Reputed persons (MVPS and bloggers) will ask question on each day of January and you need to give reply on that. You can win cool stuff.My friend Jacob Sebastian organizing this event on his site Beyondrelational.com to sharpen your dot net related knowledge. This Dot NET Quiz is a platform to verify your understanding of Microsoft .NET Technologies and enhance your skills around it. This is a general quiz which covers most of the .NET technology areas.

Want to be Quiz Master?

Also if you are well known blogger or Microsoft MVP then you can be Quiz master on the dotnetquiz 2011. Following are requirements to be quiz master on beyondrelational.com. I am also a quiz master on beyondrelational.com and

Quiz master eligibility:

You will be eligible to nominate yourself to become a quiz master if one of the following condition satisfies:

  • You are a Microsoft MVP
  • You are a Former Microsoft MVP
  • You are a recognized blogger
  • You are a recognized web master running one or more technology websites
  • You are an active participant of one or more technical forums
  • You are a consultant with considerable exposure to your technology area
  • You believe that you can be a good Quiz Master and got a passion for that

 

Selection Process:

Once you submit your nomination, the Quiz team will evaluate the details and will inform you the status of your submission. This usually takes a few weeks.

Quiz Master's Responsibilities:

Once you become a Quiz Master for a specific quiz, you are requested to take the following responsibilities.

  • Moderate the discussion thread after your question is published
  • Answer any clarification about your question that people ask in the forum
  • Review the answers and help us to award grades to the participants

For more information Please visit following page on beyondrelational.com

http://beyondrelational.com/quiz/nominations/0/new.aspx

Hope you liked it. Stay tuned!!!

Shout it
Share:

Microsoft silverlight 5.0 features for developers

Recently on Silverlight 5.0 firestarter event ScottGu has announced road map for Silverlight 5.0. There will be lots of features that will be there in silverlight 5.0 but here are few glimpses of Silverlight 5.0 Features.

Improved Data binding support and Better support for MVVM:

One of the greatest strength of Silverlight is its data binding. Microsoft is going to enhanced data binding by providing more ability to debug it. Developer will able to debug the binding expression and other stuff in Siverlight 5.0. Its also going to provide Ancestor Relative source binding which will allow property to bind with container control. MVVM pattern support will also be enhanced.

Performance and Speed Enhancement:

Now silverlight 5.0 will have support for 64bit browser support. So now you can use that silverlight application on 64 bit platform also. There is no need to take extra care for it.It will also have faster startup time and greater support for hardware acceleration. It will also provide end to end support for hard acceleration features of IE 9.

More support for Out Of Browser Application:

With Siverlight 4.0 Microsoft has announced new features called out of browser application and it has amazed lots of developer because now possibilities are unlimited with it. Now in silverlight 5.0 Out Of Browser application will have ability to Create Manage child windows just like windows forms or WPF Application. So you can fill power of desktop application with your out of browser application.

Testing Support with Visual Studio 2010:

Microsoft is going to add automated UI Testing support with Visual Studio 2010 with silverlight 5.0. So now we can test UI of Silverlight much faster.

Better Support for RIA Services:

RIA Services allows us to create N-tier application with silverlight via creating proxy classes on client and server both side. Now it will more features like complex type support, Custom type support for MVVM(Model View View Model) pattern.

WCF Enhancements:

There are lots of enhancement with WCF but key enhancement will WSTrust support.

Text and Printing Support:

Silverlight 5.0 will support vector base graphics. It will also support multicolumn text flow and linked text containers. It will full open type support,Postscript vector enhancement.

Improved Power Enhancement:

This will prevent screensaver from activating while you are watching videos on silverlight. Silverlight 5.0 is going add that smartness so it can determine while you are going to watch video and while you are not going watch videos.

Better support for graphics:

Silverlight 5.0 will provide in-depth support for 3D API. Now 3D rendering support is more enhancement in silverlight and 3D graphics can be rendered easily.

You can find more details on following links and also don’t forgot to view silverlight firestarter keynot video of scottgu.

http://www.silverlight.net/news/events/firestarter-labs/

http://blogs.msdn.com/b/katriend/archive/2010/12/06/silverlight-5-features-firestarter-keynote-and-sessions-resources.aspx

http://weblogs.asp.net/scottgu/archive/2010/12/02/announcing-silverlight-5.aspx

http://www.silverlight.net/news/events/firestarter/

http://www.microsoft.com/silverlight/future/

Hope this will help you. Stay tuned!!!.

Shout it
kick it on DotNetKicks.com
Share:

New blogger template for My blog - DotNetJaps

I have changed my blogger template to newer version of blogger. Hope you guys liked it. There are some difficulties over there but I still love the changes that blogger has offered. I know my old version of syntax highlighter is not working. But I am fixing that for all the older posts and already did it for some posts.

‘Change is in all things sweet.’

As a philosopher Aristotle has said we all should be ready to change. I have changed my blogger template due to following reasons.

  1. It’s more SEO Friendly. It is having less errors on w3c validations and It will increase search engine optimization for my blog. Still blogger template are not totally compliant like word press but blogger has decided to moved in that way so I am going to support that way.
  2. It has good way to monetize your blog.
  3. It has provided a new feature called ‘Pages’. You can create your own pages like I have created like asp.net interview questions etc. I will going to post some frequently asked interview questions over here.
  4. It has providing status same like Wordpress so its good be changed.

Above all, I have also changed my script high lighter version 3.0.83. So there might be some difficulties in older posts but I am going to fix one by one. If you found anything then please fill free to contact me via posting comment on my blog and I am going to fix that right away.

Here is screenshot my blog is look like.

MyBlog new blogger template

Please fill free to contact me if you have any question. I am going to start posting technical post soon. I need your support and I know you guys are going to provide me that.

Thanks once again all the readers who have made my blog successful.Keep reading it I will going to post more and more.

Technorati Tags: ,
Shout it
Share:

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog

  

My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews