.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

SPDiagnosticsService.Local is null on Win7 standalone configuration

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :SharePoint
I'm trying to programmatically change various diagnostic logging levels for various categories.  When I try to get the SPDiagnosticsService.Local, it returns null as if I'm not a WFE.  I am wondering if this is because I'm running on a Windows 7 standalone configuration.  Anyone else have this problem?

View Complete Post

More Related Resource Links

FileNotFound exception trying to open a site - Farm.local is Null - x64

  Hello I've created a simple asp.net application to open a site and display the title of the corresponding web. But i'm getting FileNotFoundException while trying to open the site. The same code works perfectly when i run it in a console app. My spec Windows Server 2008 R2 x64 SharePoint 2007 x64 Visual Studio 2005 My target for the asp.net app is set to 'Any CPU'. As far as permissions is considered i've checked that the current identity using which VS2005 hosts the asp.net app has full rights. In fact i've used the same identity for app pools in IIS. As an asp.net web application As a console application Any ideas? Regards NLV Visit SharePoint User group - India

Downloading a document from a sharepoint site to local file system, copy web service returns null

Hi Guys,
               I am trying to get this done for the last 2 days and I am still banging my head to the wall.
All I need to do is to download files from my sharepoint site library that uses integrated windows authentication. I was using copy webservice : getItem method to accomplish this.

CopyService.GetItem(copySource, out myFieldInfoArray, out myByteArray);

Problem : myByteArray is always returned as NULL

Note: I have tried the same with another site that uses forms authentication but the result was the same (NULL !!)

This is my code:


Copy copy = new CopyService.Copy();


Logging into sharepoint on Win7/IE8 using local server user


We have MOSS 2007.

we have a site setup that internal and external users use. The internal users all type their usernames like this: domain\username.

The external users all just typed their usernames without qualifying them.

We just received windows 7 machines. On these machines, you can't simply put the username, because the domain is listed in the dialogue box. The only way to change this appears to be to type: servername\username in the username box.

I want to change this back to the way it was. I have tried adjusting the default domain in IIS (it was blank, but I tried putting the server name in there) but that doesn't seem to work.

What else can I try? I have tried putting the web site in the trusted sites or intranet zone. I think it already knows it is an intranet site, and that is why it is putting the domain in the username for the user.

Thanks for any help!

SharePoint 2010 standalone don't work with local Active Directory



can you install a local Active Directory server on your SharePoint 2010 developer server if you also want to install SharePoint 2010 as a Standalone server?

I want to create a demo about social feature in Sharepoint 2010 and i have to install the AD and the Sharepoint standalone in the same machine.

Please tell me how to proceed?

Many thanks

SharePoint 2010 standalone don't work with local Active Directory



can you install a local Active Directory server on your SharePoint 2010 developer server if you also want to install SharePoint 2010 as a Standalone server?

I want to create a demo about social feature in Sharepoint 2010 and i have to install the AD and the Sharepoint standalone in the same machine.

Please tell me how to proceed?

Many thanks

Granting Anonymous Access in a Standalone configuration

I have installed a standalone sharepoint 2010 server and, for some reason, the "Authentication Providers" button in grayed out.  I have selected the web application; however, no matter what web application I select, the "Authentication Providers" button remains grayed out.  Also, I am listed as an administrator, so, I should have the proper permissions.

Configuring Incoming and Outgoing email settings on local standalone server 2008


Hello Friends,

I would like to enable incoming and outgoing email settings for a standalone machine. So I have setup sharepoint 2010, enabled active directory, webserver and IIS server. So please provide me the installation steps to enable emails.

Thanks & Regards, Chandra Shekhar Rameneni

Local variable scoping in C#

In my previous post, Compiler-generated scopes for local variable declarations, I briefly touched on the issue of multiple meanings applied to the same name. In this post, I'll aim to flush out the compiler's rules with regards to binding names in their local scopes.

Compiler-generated scopes for local variable declarations

I was tasked with understanding and fixing a bug on error reporting with foreach iteration variables the other day, and it got me thinking about local variable scoping rules in C# in general. First, the bug.

How to check for null/empty strings on dynamic objects?


What is the proper way to check for null or empty strings on dynamic objects? This is the only solution I've found so far:

if (admin.PasswordHash.GetType() == typeof(DBNull) || admin.PasswordHash == string.Empty)

If the field is null, the object returned is DBNull.Value, but if the field is empty string, it's return as a System.String object. This makes it impossible to do regular "admin.PasswordHash == DBNull.Value" check, as that will fail whenever the field has been set to empty string. Is my example the right (and only) way to go?

Users getting logged out because HttpContext.Current is null


We've  been trying to fix this one for a couple years, and I'm just out of ideas, so any help is really appreciated!

We've got a fairly large, complex web application that uses Forms Authentication to authenticate users.  Throughout the application we store and retrieve information about users in the Session object, and in some cases in cookies.  In a couple places we check for the existence of the context, and if it's null we send the user back to the login page to re-establish the session. 

Just a quick run-down of this web app: C#, .NET 3.5, IIS 6, ASP.NET State Service to manage session

As for the session timer, we use our own home-grown timer, which is basically a client-side timer, which is backed up by a check to the SQL database to see when their last activity was.  This seems to work well for us.  It's not perfect, but it allows us to notify the user before the session times out, and allows us to be certain we're not logging a user out before their 60 minutes of inactivity is up.

What's happening is that certain users are being logged out after just a few minutes.  We've eliminated the timer as a cause and believe what's happening is the HttpContext.Current is null, so the user is logged out.  We do not know why the HttpContext.Current is null, and I underst

ASP.NET Configuration not opening


I recently upgraded to VS 2010 and downgraded to SQL Server 2005. Now when I go Website > ASP.NET Configuration nothing happens.

It's likely this has to do with the fact that when I was installing SQL Server I got the 'ASP.net Version Registration requirement' warning, as well as the 'Failed to find the ASP.net Version Registration requirement with MS IIS'.

Anyone know what I need to get ASP.NET Configuration working?

Error while setting up application on Win7 using Visual Studio.NET 2003


Hi All,

Getting the below error while setting up application on Win 7 using visual studio.NET 2003.


cannot find the components for communiacting with the front page server extensions...


I understand by the error, i need to install Front page server extension, but not able to figure how to install using IIS 7.5.

I had XP machine with IIS 5.1, able to find the option.


Need your help in resolving this.




How to authenticate local user usin ldap or non domain authentication



I created one application, and I need to authenticate local user. This user is the user who is login to his/her Personal Computer.. Main thing his that he/she does not in any DOMAIN... I want NON-DOMAIN authentication.. any how.... please help...

Changing from Local to WCF


I've been handed an application thats connection string implies a local host connection.

I want to make this connection a remote connection, to a database located on a Server.  I want the client and server to be able to communicate with one another remotely, instead of a local connection.

How does one create the Data Service, and establish end points to Server and Client?  Is it as simple as creating a contract (which I have limited knowledge on constructing), between the two locations, setting up the dataservice, security, and ratifying the 'connetions'?

A smidge of insight, please ;-)

An endpoint configuration section for contract 'xxx' could not be loaded because more than one end



I'm trying to test calling a webservice, I've found several free ones on http://webserviceshare.com, but none of them work for me.  Some of them give example calling code in C# which I've translated to VB.NET, they're typically just two to four lines, I don't think I've translated them incorrectly.

On that I've tried is US Zip Validator.  I added a Service Reference to http://www.webservicemart.com/uszip.asmx?WSDL, called ZipService.

I then call it like so:

            Dim myZipService As ZipService.USZipSoapClient = New ZipService.USZipSoapClient()
            Dim myCity As String = myZipService.ValidateZip("27707")

I get the following error on the first line of code:

"An endpoint configuration section for contract 'ZipService.USZipSoap' could not be loaded because more than one endpoint configuration for that contract was found. Please indicate the preferred endpoint configuration section by name."

A page with information on this web service (including C# source code) is at:


'element.className' is null or not an object



I just downloaded the project, compiled it and ran it right out of the box and when I put the mouse pointer over or remove the mouse pointer from either MenuItem in the menu demo, I generate this error:

'element.className' is null or not an object

It points to this javascript method:

updateClassName: function(operation, element, name, value) {
        this[operation + 'String'](
                function() {
                    return element.className;
                function(newValue) {
                    element.className = newValue;

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