.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Making the custom webservices running under _layouts

Posted By:      Posted Date: September 28, 2010    Points: 0   Category :SharePoint

Hi All,


 I am trying to make our custom webservices available under Sharepoint _layouts folder, I will have a subfolder under _layouts and dll's in GAC and one GAC in the 80\bin folder. I don't have any safecontorls in the web.config, without them also my webservices are working fine. I want to make this folder structure in the sharepoint WSP and this wsp will be created programatically on the fly. My problem when I am trying to create a wsp, my wsp is not including the dll in the 80\bin folder which says it has copy in the GAC folder so it's skipping. But without that DLL, my webservices are not available and I always get source.ashx httpHandler cannot be loaded. 


Can I put this DLL in different folder and want to access my webservices.


Thanks in advance.


View Complete Post

More Related Resource Links

making custom apps "cluster aware"

what proactive steps can we take to make our app (ado, stored procs etc) cluster aware, in the event that we someday use clustering?  For instance, I read things about retry strategies etc but dont even know if retry is on a different connection or what appears to be the same connection.  We already make our trans as small as possible.

Add items to sharepoint custom list using javascript with webservices



Here is the code snippet i was trying to insert item to sharepoint list but i conn't please help me what is wrong in my code and modify it.


function addlistitem(item)


var xmldoc;

var batch;

var FeedbackHTTP;

var ListName = 'Suggestions';

//The batch variable builds up the XML that we are going to submit to the SharePoint list via the SharePoint web service

batch = "<batch><method id='1' cmd='New'><field name='Title'>" + item + "</field></method></batch>";

xmldoc = '<?xml version="1.0" encoding="utf-8"?><soap:envelope xsi="http://www.w3.org/2001/XMLSchema-instance" xsd="http://www.w3.org/2001/XMLSchema" soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:body><updatelistitems xmlns="http://schemas.microsoft.com/sharepoint/soap/">'

xmldoc = xmldoc + '<listname>' + ListName + '</listname>';



xmldoc = xmldoc + '<updates>' + batch + '</updates></updatelistitems></soap:Body></soap:Envelope>';

FeedbackHTTP = new ActiveXObject("MSXML2.XMLHTTP.3.0");


Custom Timer Job - Not running?


I have a Timer Job that was running fine in our production environment.  I noticed some possible memory leaks, so I added some code to do some more diagnostics work and tried to delete and re-create the timer job.  I did this after copying the new DLLs to the GAC and resetting IIS.

However, now the Timer Job won't execute.  It is scheduled to run every 15 minutes.  I see nothing in the logs for the job and it doesn't show up in the Timer Job Status list.  Is there a way to manually execute the job?  What could be causing this issue?

Custom Timer Job - Running on wrong server?


I have a WFE + Index Server farm setup.  I deployed a custom timer job on the WFE, and it's only executing on the Index server.  How do I force a job to run on a specific server?

Also, it's status is 'Failed', but there's nothing in the event log?

Custom User Control Running Multiple Times



I have a strange problem that I ran across testing something else on my site.  On my Default.aspx page, I register a user control and call it to render and fill in some HTML on the page.

<%@ Register Src="controls/Home/GetFriendFeed.ascx" TagName="GetFriendFeed" TagPrefix="uc1" %>

<uc1:GetFriendFeed ID="GetFriendFeed1" runat="server" />

When I go to Default.aspx, it calls the control once, not a problem.  I have a nested MasterPage (not sure if that is the cause), that is the same for both of these pages.  When I go to another page, profile.aspx, that does NOT have the @Register or the user control anywhere on the page, the user control executes 3 times. 

I'm not sure what the cause of this is.  Any help or advice of where to look would be helpful!


Thank you

Claims Based Authentication and Custom Apps in _layouts Directory


Hello everyone,

When we originally setup our SharePoint 2010 installation, we used Windows Classic Authentication. We have since built a couple of custom applications using VS2010 and deployed them to the _layouts directory. These apps query information from our ERP system and display them on a web page. We keep this inside of SharePoint to be consistent with the look and feel of the rest of the intranet.

We had a consultant come in to help with some other items with our SharePoint install and we converted to Claims Based Authentication. Now, when trying to use these custom applications, they ask for a username and password when you submit the information to query. When you provide the info, it does not authenticate and fails after three attempts. Does anyone know what additional steps are necessary for these apps to use the Claims Based Security Tokens? I've scoured the internet for two days looking for answers and haven't come up with anything useful.

Custom Controls in C# .NET

Embedding user controls in a Windows form is just like adding a simple button or text box that are already provided with .NET. These basic controls were written essentially like you code your own controls. Typically the controls you design are to be used in multiple forms or to modularize your code. These reasons help reduce the amount of code you have to type as well as make it easier for you to change your implementation. There should almost never be any reason to duplicate code because it leaves a lot of room for bugs. So, implementing functionality specific to your control in the control's source code is a good idea. This reduces code duplication as well as modularize your code, which is a good programming guideline.

Making Ajax Callbacks to the Server Using jQuery with ASP.NET

In the first part of this article series I introduced jQuery's functionality and how it provides a rich client side programming model. This time around I'll expand on these concepts and show you how you can use jQuery in combination with ASP.NET using it as an AJAX backend to retrieve data. I'll also discuss how you can create ASP.NET controls and otherwise interact with jQuery content from ASP.NET pages in WebForms.

jQuery is just a JavaScript library so it will work seamlessly with ASP.NET both from page code as well as through backend driven code using the Page.ClientScript object or ScriptManager. You can use jQuery on its own as a client side and Ajax library that communicates with ASP.NET or you can use jQuery in combination with ASP.NET AJAX. The two actually complement each other quite well as jQuery provides functionality that the ASP.NET AJAX library does not and vice versa. For the most part the interaction between the two libraries is trouble free except for a few very rare edge cases.

Writing custom MembershipProvider

ASP.NET Membership mechanism allows to use the build-in server tables to store and retrieve user data. By default, this mechanism can only be used with SQL Server database to which Microsoft provides suitable MembershipProvider class.
Inheriting from this abstract class, developer can use his own table(-es) from any database and use any database engine other than SQL Server, like Oracle, DB2 etc.

Custom Editing Behavior for DataGridView TextBox Columns

For various reasons I'm using a DataGridView instead of a ListView, and while configuring the DataGridView to look like a ListView wasn't much of a problem, there's one thing that got on my nerves, which is the behavior of textbox cells in edit mode: It is much too easy to leave the edit mode accidentally, simply by pressing the cursor keys at the wrong time. For example when the text caret is positioned behind the last character of the textbox cell content, and you press the right arrow key

Write Custom WebParts for SharePoint 2007

The popularity of SharePoint Portal Server 2003 led Microsoft to tightly integrate the next SharePoint version, Microsoft Office SharePoint Server (MOSS) 2007, with its ASP.NET 2.0 WebPart framework. This tight integration enables the ASP.NET and SharePoint developer to do a number of things that previously weren't possible

Making Sense of ASP.NET Paths

ASP.Net includes quite a plethora of properties to retrieve path information about the current request, control and application. There's a ton of information available about paths on the Request object, some of it appearing to overlap and some of it buried several levels down, and it can be confusing to find just the right path that you are looking for.

Writing Custom Web Parts for SharePoint 2007

As I mentioned in an earlier blog post, SharePoint 2007 is built on top of ASP.NET 2.0, which means you can now use ASP.NET 2.0 features (Forms Authentication, Master Pages, Membership, Site Navigation, New Data Controls, etc) when building SharePoint sites. This is true for both the new Windows SharePoint Services 3.0 version (which will be a free download) as well as Microsoft Office SharePoint Server 2007 (which costs money).

Show grand total running total in GridView Footer

In many scenarios we need to display Running total as well as Grand total in GridView footer. In this post i will try to explain in an easy way that how we can display running total & Grand total in a GridView footer combindly. To explain this solution using an example here i use a sales order report. The report contains all sales order amount in a tabular way. I will use a GridView to display sales order amount and use GridView footer to display Running total & Grand total. Let we have a customer table with id and name column plus an orders table with OrderID,CustomerID,OrderDate & Amount. Now our goal is to show all customers order with amount as well as page wise running total & grand total. Note that running total is necessary when you enable paging in a GridView where as Grand total is always you can consider.

Custom views on .aspx webpage


Hi again, i have a client that needs me to create a custom view on thier webpage similar to Microsoft Word.

It goes about that, when I click on an image it redirects me to another page and must create a custom view for a certain paragraph on that page. I am not sure how to do this and wonder if anyone knows how.

I am using C# programming language if that helps at all. I Heard that using javascript would work but i dont know javascript yet so is there any alternative?

Set Custom Paper size in C#.net 3.5


Dear All,

I have to set custom paper size 6X8 inches

plz tell sugest me code how to do it.

in C#.net 3.5

i m using Asp.net 3.5 Crystal report

i have to do it programiticlly



Problem making Role based Menu in MVC application



 I want to make Rolebase menu in MVC such that if user doesnot have permission for some action then that Action name shouldnot be shown in the Menu.

 I have used the code in the url(http://forums.asp.net/t/1566328.aspx) in my MVC application.My application is a Discussion Forum(in MVC) same functionality as in this forum forums.asp.net

 I have used Controllers for post, thread etc.In each controller there are some actions that are using [Authorize(Roles)] attribute

 but this coding does not count  those Actions in Controllers having Authorize attribute according to the url http://forums.asp.net/t/1566328.aspx 

 In the code, Authorize attribute is applied to Controller class, but my requirement is of Applying Authorize attribute to some actions in controller so that some are available for all users and  some links are available rolewise.Now what is the solution for that?



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend