Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))


I was getting the above error while deploying the Site Definition in SharePoint. The unique thing about this error was that after some time it used to get resolved itself.

Then while searching for it i found the following solution for it which is to Stop the Indexing Service.

And it really worked.

Bye..

Resource (.resx) files in Custom Content Type


These are the steps we need to follow

Suppose this the custom content type

<?xml version=”1.0″ encoding=”utf-8″?>
<Elements Id=”555705e7-e69f-4670-a972-c7bab158f935″ xmlns=”http://schemas.microsoft.com/sharepoint/”>
<ContentType ID=”0x010100923d6eee64764f08baa6903fb9095a6c”
Name=”GContentType”
Group=”Development”
Description=”Developing Content Type”
Version=”0″>
<FieldRefs>
<FieldRef ID=”{38ae2eb9-fca6-448b-9c8d-47abfeb7fbb5}” Name=”GContentTypeField” />
</FieldRefs>
</ContentType>
<Field ID=”{38ae2eb9-fca6-448b-9c8d-47abfeb7fbb5}”
Type=”Text”
Name=”GContentTypeField”
DisplayName=”$Resources:GED,Mission”
StaticName=”GContentTypeField”
Hidden=”FALSE”
Required=”FALSE”
Sealed=”FALSE” />
</Elements>

Here GED would be the name of resource files and mission is the Key Name.

Resource

GED.resx file needs to be deployed to ..12\Resources directory.

And in the feature.xml set

DefaultResourceFile=”GED”

http://innersharepoint.blogspot.com/2009/10/how-to-locolize-site-columns-using.html

http://blogs.msdn.com/b/joshuag/archive/2009/03/07/using-resource-files-resx-when-developing-sharepoint-solutions.aspx

Bye..

InfoPath forms and SQL Server Reporting Services


Hi,

I recently worked on a report project having InfoPath form in SharePoint’s InfoPath library as it’s Data Source.

For understanding purpose let’s start with a very simple InfoPath form having two text boxes in it named txtFirstName and txtLastName.

Form

Let’s first define a Data Source for our report.

Name:- InfoPathDataSource

Type:- XML

Connection String : (Suppose the url for our InfoPath library is following

http://nrana-1710-vm1:2575/Sample/Forms/AllItems.aspx and the name of the InfoPath form is PersonalInfo.

So in this case our connection string would be

http://nrana-1710-vm1:2575/Sample/PersonalInfo.xml

Now let’s create a new DataSet having InfoPathDataSource as its data source.

Name :- InfoPathDataSet

Data source :- InfoPathDataSource

Command Type :- Text

Query String :-  ( For defining query string we need to first open up the PersonalInfo.xml file. Paste the following url in IE http://nrana-1710-vm1:2575/Sample/PersonalInfo.xml and download and open the xml file.

Suppose this is the content of the PersonalInfo.xml file

<?xml version="1.0" encoding="utf-8"?>
<?mso-infoPathSolution
name="urn:schemas-microsoft-com:office:infopath:Sample:-myXSD-2010-05-26T09-16-03"
solutionVersion="1.0.0.10"
productVersion="12.0.0.0"
PIVersion="1.0.0.0"
href="
http://nrana-1710-vm1:2575/Sample/Forms/template.xsn"?>
<?mso-application
progid="InfoPath.Document"
versionProgid="InfoPath.Document.2"?>

<my:myFields xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2010-05-26T09:16:03" xml:lang="en-US">
    <my:txtFirstName>Nishant </my:txtFirstName>
    <my:txtLastName>Rana</my:txtLastName>
</my:myFields>

The  Query String to retrieve First and Last name value would be

<Query xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2010-05-26T09:16:03"
xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" xml:lang="en-us">
    <ElementPath>
        my:myFields           
    {
        my:txtFirstName(String),
        my:txtLastName(String)       
    }
    </ElementPath>
</Query>

We also define a parameter in our data set to which we would pass the url to the infopath form i.e.

http://nrana-1710-vm1:2575/Sample/PersonalInfo.xml

That’s it, now if we run the query we can get values for first name and last name.

In case if your InfoPath xml form is looks like this

<my:myFields xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2010-05-12T05:10:51" xml:lang="en-US">
    <my:group1>
        <my:group2>
            <my:field1>2</my:field1>
            <my:field2>nishu</my:field2>………….

Than the Element Path of Query String would be like

<ElementPath>
        my:myFields/my:group1/my:group2          
    {
        my:field1(String),
        my:field2(String)       
    }
    </ElementPath>

Bye…

The query cannot be run for the following DataObject: InfoPath cannot run the specified query. Access is denied


Hi,

we got the above error while using a Web Service as a data connection.

This is the step we followed to resolve it

Go to Tools–>Form Options–>Select “Security and Trust ” and set it to “Full Trust”.

Bye..

The following users do not have e-mail addresses specified: . Alerts have been created successfully but these users will not receive e-mail notifications until valid e-mail addresses have been provided Set my e-mail address…


Hi,

We were receiving the above error while trying to use the “Alert Me” feature.

The reason was because email was not specified for the user. We can check it over here.

Click on Welcome User Name –> My Settings on the top right corner

There we can see “work e-mail“ as blank.

And if we click on “Edit Item” to edit that information, we can only see the account name and an option for attaching file. So that information cannot be edited over here and why so?

The reason for this is following, i found this in one of the forums for SharePoint

“There are actually 2 user profiles – one is a WSS profile and one is a MOSS profile. The WSS profile you access from Welcome user > My Settings page. The MOSS profiles are created when users are imported into the system from AD or LDAP. They are access from People Search or from a link off of your MySite.

The reason there are 2 is that you can install WSS without MOSS and they wanted a basic user profile. If you installed WSS without MOSS, you would see the profile (again, accessed through Welcome user > My Settings page) with about 3 properties.

If you install MOSS, do an import, and go to the WSS profile, you’ll see a bunch of properties added that MOSS adds. We now depricate the WSS profile. If you want to add property values to your profile, you need to go to your MOSS profile from your MySite (MySite > Details). You’ll be on the editprofile.aspx page. Add your properties. We then sync your properties to the WSS user list. You will see the values show up on the WSS profile after the sync happens.”

So as per the description we need to add the work email to our user profile first and then we need to sync that MOSS’s user profile to our WSS profile.

For this we will first open the Shared Services site,

than select User Profile and Properties—> Select View User Profile –> Select a particular user and edit it’s profile.

We will specify the value for Work e-mail property over there.

Followed by Save and Close.

Now we need to sync it back to WSS profile

For this we need to use the following command

Stsadm -o sync -synctiming m:5

It means that the schedule for the Profile Sync job to run is every five minutes. The default value is 1 hour.

Then run this command line:

Stsadm -o sync -sweeptiming m:1

  • -o -synctiming changes the Profile Sync job
  • -o -sweeptiming changes the Quick Profile Sync job

At times it might not work so we need to follow this step as well

stsadm -o sync -listolddatabases <n> 

stsadm -o sync -deleteolddatabases <n> 

The listolddatabases <n>option will list the databases that have not been successfully syncronized the last <n> days, and the deleteolddatabases <n>option will delete the syncronization information from the databases that are not successfully syncronized the last <n> days.

If this also doesn’t help than we need to do the server reboot. That would definitely work. At least that worked in my case 🙂

 

This article has got all the information http://sharepointnotes.wordpress.com/2008/05/05/syncing-wss-and-moss-user-profile-properties-with-active-directory/

Bye..

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) while deploying solution.


Hi,

We were receiving this error randomly while trying to deploy the solution from within Visual studio. This error used to crop up randomly. Sometimes after waiting for few seconds or minutes if we try again, things used to work properly without that error.

In one of the forums it was suggested that stopping the indexing service would resolve the issue.

I tried it and it really worked.

Check out that thread

http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/8123068c-10ca-4271-b8bc-ac2e934531bf

Bye..