Hello everybody,
It's a known thing that it's not that easy to start working with Sessions when developing custom webparts. It demands several modifications on server etc.
If you have jumped over that issue, you may face further ones about storing objects in Session.
One of the key elements here is being "Serializable" Even depending on your configuration, Sharepoint may allow you to use non-serialiazable classes in session or not.
But if you're facing "unknown error" in your session-using custom webpart, take a look at your session objects and be sure that all of them are serializable ones.
(You can define your all classes with [Serializable] attribute, by the way.)
Wednesday, June 1, 2011
Wednesday, December 8, 2010
Windows Azure & SQL Azure - A Fresh Start For Development
Microsoft is releasing some free accounts for Windows and SQL Azure these days for their partners. If you have your free accounts, then it's time to start developing something for the cloud.
After this step, maybe you need to also do something on SQL Azure.
Be careful: SQL Server Management Tools versions before than 2008 R2 are not fully compatible with SQL Azure, you cannot use "object explorer" though you can open a query window directly. Here the solution is downloading the latest SQL Server Management Studio Express for free.
After that connecting to SQL Azure is quite same like classic SQL Authentication method: From the management console of SQL Azure you'll learn the connection address for your database, username and password. That's it, then from the Management Studio you can create your tables and from ordinary .NET SQL classes, you can connect your application from your ASP.NET application which is compiled for Azure.
Rumors say that Microsoft is spending a very big effort on Bing, Mobile and Cloud these days as they want to keep their positions in the game against Google and Apple. My experience so far is, Windows and SQL Azure are extremely easy to start with, no need to worry.
Tuesday, December 22, 2009
SPFile Item Update Error: Operation is not valid due to the current state of the object.
It's very frustrating and can take a whole working day: You are trying to update a library (list) item from Sharepoint object model and getting this error continiously.
In fact, solution is simple: RunWithElevatedPrivileges is working buggy in Sharepoint 2007, so the best things is avoiding putting code in it as much as possible.
For instance, if you want to simply update "Title" of an item in your document library, it should appear like this;
SPFile FileToModify = null;
SPSite ElevatedSite = null;
SPWeb ElevatedWeb = null;
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPSite Site = new SPSite(SiteCollectionUrl))
{
ElevatedWeb = Site.RootWeb;
ElevatedSite = Site;
}
});
SPItem Items = FileToModify.Item;
ElevatedSite.RootWeb.AllowUnsafeUpdates = true;
Items["Title"] = "new title";
FileToModify.Item.UpdateOverwriteVersion();
ElevatedSite.RootWeb.AllowUnsafeUpdates = false;
Returning = "ok";
--
--
Then you won't face any errors.
Labels:
Document Library,
Item,
RunWithElevatedPrivileges,
SharePoint,
SPFile,
Update
Sunday, February 22, 2009
Silverlight: MultScaleImage Catches All Events On Page
As the version 2.5, Deep Zoom Composer has a good option for beginner coders to play with it's output's source code, including the both XAML and C# ones. These days many people choose to start developing nice photo shows with it's original output.
However, if you decide to add extra functionality such as buttons etc., you may face that MultiScaleImage (the Deep Zoom area) catches every click on whole page, even it is located in a seperate canvas apart from other elements.
This problem is caused by the original output generator. By default, all mouse events are binded to page. Just go to your source code and modify this.MouseLeftButtonUp etc. events into msi.MouseLeftButtonUp. After this, MultiScaleImage will only catch its mouse events, not the unrelated ones.
However, if you decide to add extra functionality such as buttons etc., you may face that MultiScaleImage (the Deep Zoom area) catches every click on whole page, even it is located in a seperate canvas apart from other elements.
This problem is caused by the original output generator. By default, all mouse events are binded to page. Just go to your source code and modify this.MouseLeftButtonUp etc. events into msi.MouseLeftButtonUp. After this, MultiScaleImage will only catch its mouse events, not the unrelated ones.
Monday, January 26, 2009
Visual Studio crashes in every Silverlight exception
It is very frustrating for even the smallest exception, Visual Studio 2008 crashes immediately. Some people are started to get used to live with that, however, there is a very very simple solution for it.
Probably you are using Visual Studio 2008 in another language like German, French etc. Just switch it to English from Visual Studio settings. No reinstallation needed.
Then - magic. Your Visual Studio will break operation when an exception thrown and you will be able to read the exception cause.
I am really unhappy with Silverlight guys in Microsoft to let these simple errors exist in Silverlight development. This is not a beta version, this is Silverlight 2's official release.
Probably you are using Visual Studio 2008 in another language like German, French etc. Just switch it to English from Visual Studio settings. No reinstallation needed.
Then - magic. Your Visual Studio will break operation when an exception thrown and you will be able to read the exception cause.
I am really unhappy with Silverlight guys in Microsoft to let these simple errors exist in Silverlight development. This is not a beta version, this is Silverlight 2's official release.
Monday, September 22, 2008
Silverlight: "Open in Expression Blend" in Visual Studio 8 doesn't work
Microsoft Expression Blend 2.0 is not compatible with Visual Studio 8. When you try to edit your XAML page in Expression Blend, there are some errors saying that XAML page is not valid.
The solution is simple, you have to download and install Microsoft Expression Blend 2.5 June Preview. After installation, don't forget to run it once.
This should resolve the compability issue between Visual Studio and Expression Blend.
The solution is simple, you have to download and install Microsoft Expression Blend 2.5 June Preview. After installation, don't forget to run it once.
This should resolve the compability issue between Visual Studio and Expression Blend.
Wednesday, August 20, 2008
A first Silverlight step / Deep Zoom Composer
Since Microsoft decided to release millions of products, it has been confusing to follow all new names belong to them, but Silverlight is not one of these small tries: They take every chance to make Silverlight popular and in my opinon, they are on the right way. Every developer and designer around are aware of Silverlight these days.
If you want to have a very first step to Silverlight on your website, may something like this seem nice on yours;
Hard Rock Cafe Memorabilia
So, if you want to make a image gallery very similar to this, Microsoft has a small and nice tool, Deep Zoom Composer. It produces pure Silverlight and HTML output and it's very easy to build up a custom gallery for your needs. Seems fantasticly cute.
If you don't like Flash and Actionscript, Silverlight & .NET has many opportunities and deserves at least a try.
If you want to have a very first step to Silverlight on your website, may something like this seem nice on yours;
Hard Rock Cafe Memorabilia
So, if you want to make a image gallery very similar to this, Microsoft has a small and nice tool, Deep Zoom Composer. It produces pure Silverlight and HTML output and it's very easy to build up a custom gallery for your needs. Seems fantasticly cute.
If you don't like Flash and Actionscript, Silverlight & .NET has many opportunities and deserves at least a try.
Subscribe to:
Comments (Atom)