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:

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