ASP.NET Error – The state information is invalid for this page and might be corrupted
I ran into this error a second time in the last couple of years and totally forgot how I fixed it, so i’ll blog what my situation and resolution was as a reminder and hopefully to help others.
I have an ASP.NET “default.aspx” page with a form text field with
Popularity: 6% [?]
Read MoreAllowing Personalization in SharePoint 2010
SharePoint personalization allows users a level of customization by adding or removing web parts to their page. To test this you should have two different user accounts. Here are steps I took to get this working:
1. Open up SharePoint Designer 2010 and edit a page layout that has web part zones like “BlankWebPartPage.aspx”.
2. Locate the “
4. Logged in as the current user, click on the username in the top right corner and select “Personalize this page”.
5. Add 1 or 2 web parts which will only be visible to this current user, let’s call this “User A”. Save and publish this page if necessary.
6. Next login as “User B” and you shouldn’t see the web part(s) for “User A”. You can click on the top right username again and select “Personalize this page”.
7. Add a web part only visible for “User B”. Save and publish again.
8. The bottom line is that both users will have their own custom personalized page.
Popularity: 3% [?]
Read MoreSharePoint 2010 spscore PlaceHolderPageTitle PageParserPath Bug
Actually not sure if this is a bug or whatever, but whenever we take a copy of a MySite masterpage in SharePoint 2010 and make our own copy of it we get this error about the PlaceHolderPageTitle and spscore. Don’t quite remember how we figured this out but I couldn’t find much googling or binging.
To fix this, you need to go into your SharePoint 2010 MySite web.config and replace the existing
1 | <pageparserpaths></pageparserpaths> |
with the PageParserPath to your MySite masterpage as shown below:
1 2 3 | <pageparserpaths>
<pageparserpath VirtualPath="/my/_catalogs/masterpage/New_MySite.master" CompilationMode="Always" AllowServerSideScript="true" />
</pageparserpaths> |
Popularity: 47% [?]
Read MoreUpgrading A SharePoint WSP With A New Feature
I know this post is very specific, i’ll go into how to create a WSP from scratch, how to build specific features, etc. in future posts. In this scenario, you have an existing WSP project and added a new feature that creates a link in the Site Settings section called Awesome Link, also assume we used WSP Builder to build a nice WSP file for you, let’s call this file AwesomeLink.wsp
Step 1
This is easy, just copy AwesomeLink.wsp to a folder on your SharePoint server. We’ll call this folder c:\projects\WSPs
Step 2
Now we will use STSADM to upgrade the solution by opening up a Command Prompt, one of the quickest ways to do this is to click on Start > Run, then type in CMD and press OK.
Next navigate to the folder where you copied over the AwesomeLink.wsp file, in this case it’s c:\projects\WSPs
Step 3
Type this first command and press the Enter key:
stsadm -o upgradesolution -filename "AwesomeLinks.wsp" -name "AwesomeLinks.wsp" -immediate -allowgacdeployment
Then type the second command and press Enter:
stsadm -o installfeature -name "AwesomeLink" -force
Step 4
Next go to your SharePoint site and click on Site Actions > Site Settings > Modify All Site Settings
Click on Site Collection Features link located under the Site Collection Administration group.
That’s It!
You’re all done upgrading a SharePoint WSP, go take a break or play some Xbox 360!
Popularity: 39% [?]
Read MoreTest IE6 On A Free Virtual PC Image
I’m sure like everyone else you wish IE6 would just go away which it eventually will. The hate for IE6 has gone as far as dedicated websites such as IE Death March and wallpaper However in the meantime if you need to test on IE6 there are a few ways this can be done:
Today I’m going to show you an alternative method testing IE6 in the most accurate manner possible, using a Virtual Machine:
- First download VPC (Virtual PC) if you don’t already have it
- Then install IE6-XPSP3.exe which is a VPC disk image for testing in a native IE environment.
- After you get this image up and running, if you start running Windows Update be sure not to install IE8
Popularity: 62% [?]
Read MoreUsing MySpace REST API with OAuth and C#
In this example we will make a REST call to MySpace, get back 100 of our friends and display them on a web page. Because we’re accessing personal private information, you need to pass some authorization parameters with your REST call, and MySpace has adapted the OAuth authorization standard. Before I start explaining more about the code, make sure you already have a MySpace account, then follow the next few steps:
- Go to: http://developer.myspace.com/ and
- Click on Build on the top nav.
- Select Create on-site app button, and fill out your app info.
- When you get to the section for upload app xml, click on skip this step.
- Make a note of your OAuth Consumer Key and OAuth Consumer Secret because you will need it later.
- Under the Canvas Surface tab, select External IFrame option.
- Then you have to add the app, otherwise you may get 401 access denied error attempting to make a request.
Okay, hit save and you should be good for now. Let’s open up Visual Studio 2008 and begin!
- Create a Website called MySpaceApp or whatever you want.
- Copy this file OAuthBase.cs into your project
- Add using OAuth namespace at the top of Default.cs
- Declare variables for your consumer key, consumer secret and request server:
1 2 3 4 5
<code> protected string consumerKey = "http://www.myspace.com/123456789"; protected string consumerSecret = "12abcd345678efghi90jk"; protected string requestServer = "http://api.myspace.com"; </code>
- Create a public MakeRequest() method returning a DataSet.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
<code> public DataSet MakeRequest(string restCall) { // Form the full REST request url Uri url = new Uri(requestServer + restCall); DataSet ds = new DataSet(); // Instantiate OAuthBase and declare variables OAuthBase oAuth = new OAuthBase(); string nonce = oAuth.GenerateNonce(); string timeStamp = oAuth.GenerateTimeStamp(); string normUrl = string.Empty; string normParams = string.Empty; string strRequest = string.Empty; // Create an OAuth signature string signature = oAuth.GenerateSignature(url, consumerKey, consumerSecret, string.Empty, string.Empty, "GET", timeStamp, nonce, OAuth.OAuthBase.SignatureTypes.HMACSHA1, out normUrl, out normParams); // Construct the OAuth authenticated REST url strRequest = normUrl + "?" + normParams + "&" + UrlEncode("oauth_signature") + "=" + UrlEncode(signature); return MakeWebRequest(strRequest); } </code>
- Next create a MakeWebRequest() method returning a DataSet
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<code> protected DataSet MakeWebRequest(string restCall) { // Make web request HttpWebRequest request = WebRequest.Create(restCall) as HttpWebRequest; using (HttpWebResponse response = request.GetResponse() as HttpWebResponse) { // In this example we are getting back XML XmlTextReader xReader = new XmlTextReader(response.GetResponseStream()); DataSet ds = new DataSet(); ds.ReadXml(xReader); xReader.Close(); return ds; } } </code>
-
Finally create a GetFriendList() method that will make the REST request and bind it to a Repeater displaying all your friends.
1 2 3 4 5 6 7
<code> protected void GetFriendList() { rptFriends.DataSource = fb.MakeRequest("/v1/users/YOUR_USER_ID/friends.xml?page_size=100"); rptFriends.DataBind(); } </code>
- I also built this REST Test Tool that uses OAuthBase.cs that will help you create sample REST calls so you can validate the OAuth parameters.
Popularity: 100% [?]
Read More
![[del.icio.us]](http://stevenng.net/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://stevenng.net/wp-content/plugins/bookmarkify/digg.png)
![[Facebook]](http://stevenng.net/wp-content/plugins/bookmarkify/facebook.png)
![[LinkedIn]](http://stevenng.net/wp-content/plugins/bookmarkify/linkedin.png)
![[MySpace]](http://stevenng.net/wp-content/plugins/bookmarkify/myspace.png)
![[StumbleUpon]](http://stevenng.net/wp-content/plugins/bookmarkify/stumbleupon.png)
![[Twitter]](http://stevenng.net/wp-content/plugins/bookmarkify/twitter.png)
![[Windows Live]](http://stevenng.net/wp-content/plugins/bookmarkify/windowslive.png)
![[Yahoo!]](http://stevenng.net/wp-content/plugins/bookmarkify/yahoo.png)
![[Email]](http://stevenng.net/wp-content/plugins/bookmarkify/email.png)