SharePoint C# - SecurityException: WebPermission Request Error

/* Posted June 16th, 2008 at 1:47pm [Comments: none] */
/* Filed under C#, Microsoft, Programming, SharePoint, Windows */

Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application’s trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type ‘System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′ failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

If you care getting the error above in SharePoint, there is a simple work around to get your code to work.

1. Open the wss_minimaltrust.config located: “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\CONFIG”

2. Under the XML section <namedpermissionsets> and under the last <permissionset> add


<ipermission>
class=”WebPermission”
version=”1″
Unrestricted=”true”>
</ipermission>

3. Save the file and you are good to go!

  • Digg
  • del.icio.us
  • Propeller
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Mixx
  • NewsVine
  • Blogsvine
  • Facebook
  • Google
  • TwitThis

Create ID Field in SharePoint List

/* Posted June 2nd, 2008 at 4:45pm [Comments: none] */
/* Filed under Microsoft, Programming, SharePoint */

This seams to be a common problem, and one that I get many calls from users about:

I have a query with our Sharepoint site and was advised that you were probably the best person to ask.

I have created a list under:

http://sharepoint/sites/department/Lists/ListName/AllItems.aspx

I need the first column (Issue ID) to be an automatically generated number but can’t seem to get it. Would it be possible for you to take a look and advise?

You can’t add a new unique auto-generated ID to a SharePoint list, but there already is one there! If you edit the “All Items” view you will see a list of columns that do not have the display option checked.

There are quite a few of these columns that exist but that are never displayed, like “Created By” and “Created”. These fields are used within SharePoint, but they are not displayed by default so as not to clutter up the display. You can’t edit these fields, but you can display them to the user. if you check the “Display” box beside the ID field you will get a unique and auto-generated ID field displayed in your list.

  • Digg
  • del.icio.us
  • Propeller
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Mixx
  • NewsVine
  • Blogsvine
  • Facebook
  • Google
  • TwitThis

SharePoint Winner takes a Picture of his Gift Cards

/* Posted May 21st, 2008 at 4:32pm [Comments: none] */
/* Filed under News, SharePoint */

As we reported in one of our previous posts: 2008 Sleepless Winners. The picture above shows the what $5,095 in Bestbuy gift cards look like. The break down was 10 $500 cards + one $75 and one $25 card. I heard one winner promptly went out and used it to buy a Sony Playstation 3. Thanks Microsoft!

  • Digg
  • del.icio.us
  • Propeller
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Mixx
  • NewsVine
  • Blogsvine
  • Facebook
  • Google
  • TwitThis

Windows 2008 and SharePoint 2007 Don’t Play Nice

/* Posted May 9th, 2008 at 4:24pm [Comments: 1] */
/* Filed under Microsoft, PC, Programming, SharePoint, Windows */

Recenlty i was trying to get a development environment setup on my new Windows 2008 computer, and was installing the typical Microsoft items. Little did i know that SharePoint 2007 wont install on Windows 2008:

Here is the error I ran into: Read more »

  • Digg
  • del.icio.us
  • Propeller
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Mixx
  • NewsVine
  • Blogsvine
  • Facebook
  • Google
  • TwitThis

“Column ordering” not showing up SharePoint List

/* Posted May 2nd, 2008 at 10:18am [Comments: none] */
/* Filed under Microsoft, Programming, SharePoint */

Missing the Column Ordering button on the List settings screen? Need to figure out how to move items around on the edit screen? Recently I ran into this issue where the “Column Ordering” option that was normally there went missing on a few of my lists.

Go to the list you want to edit
Click on any of the 3 links listed under the Columns section

  • Create column
  • Add from existing site columns
  • Indexed columns
  • In the URL bar, replace the aspx page with “formEdt.aspx” and that will bring you to the Column ordering section.

    Read more »

    • Digg
    • del.icio.us
    • Propeller
    • Reddit
    • Slashdot
    • StumbleUpon
    • Technorati
    • Mixx
    • NewsVine
    • Blogsvine
    • Facebook
    • Google
    • TwitThis

    Office SharePoint Server 2007 Training

    /* Posted March 29th, 2008 at 7:00am [Comments: none] */
    /* Filed under Microsoft, SharePoint */

    ms_sp071.jpg

    For those looking forward to jumping into the MOSS (Micosoft Office SharePoint Server) world, Microsoft has released a stand-alone training edition. The download size is approx 142MB

    Overview
    Microsoft Office SharePoint Server 2007 offers a rich set of features to help you manage workflow, maintain document version control, connect to business intelligence applications, track key performance indicators for your business, add blogs and wikis to improve knowledge transfer and enhance collaboration, and more.
    Read more »

    • Digg
    • del.icio.us
    • Propeller
    • Reddit
    • Slashdot
    • StumbleUpon
    • Technorati
    • Mixx
    • NewsVine
    • Blogsvine
    • Facebook
    • Google
    • TwitThis

    SharePoint Search Failing: Application Server job failed for service instance

    /* Posted March 20th, 2008 at 11:36am [Comments: none] */
    /* Filed under C#, Microsoft, Programming, SharePoint */

    Was getting this error:

    Application Server job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance (34c9a339-ef4a-454b-a288-812fd2fd1270).
    Read more »

    • Digg
    • del.icio.us
    • Propeller
    • Reddit
    • Slashdot
    • StumbleUpon
    • Technorati
    • Mixx
    • NewsVine
    • Blogsvine
    • Facebook
    • Google
    • TwitThis

    Debugging tips when working with Sharepoint 2007 (WSS and MOSS)

    /* Posted March 12th, 2008 at 3:54pm [Comments: none] */
    /* Filed under C#, Microsoft, SharePoint */

    Common SharePoint Errors and their fixes:

    I have run into a lot of errors while programming for SharePoint.  Here are a few that I think everyone should find about and figure out how to solve.

    Read more »

    • Digg
    • del.icio.us
    • Propeller
    • Reddit
    • Slashdot
    • StumbleUpon
    • Technorati
    • Mixx
    • NewsVine
    • Blogsvine
    • Facebook
    • Google
    • TwitThis

    Developer Tools for SharePoint 2007

    /* Posted March 11th, 2008 at 9:41am [Comments: none] */
    /* Filed under C#, SharePoint */

    After working with SharePoint for awhile, I have found a few tools that I think save a lot of time. 

    Tools I recommend looking into: Read more »

    • Digg
    • del.icio.us
    • Propeller
    • Reddit
    • Slashdot
    • StumbleUpon
    • Technorati
    • Mixx
    • NewsVine
    • Blogsvine
    • Facebook
    • Google
    • TwitThis

    Automating Word docs to PDF in c# for SharePoint

    /* Posted March 10th, 2008 at 3:33pm [Comments: 2] */
    /* Filed under C#, PDF, SharePoint */

    Recently I was asked to write some code that would automate the conversion of word docs to pdf from a web upload.  At first I figured it would be an easy task.  I first tried to use the office.dlls, and everything worked…  I then read a best practise.  Do not use the Office.dlls on servers because office is not a server plateform. Read more »

    • Digg
    • del.icio.us
    • Propeller
    • Reddit
    • Slashdot
    • StumbleUpon
    • Technorati
    • Mixx
    • NewsVine
    • Blogsvine
    • Facebook
    • Google
    • TwitThis

    Anything Geeky Goes!

    Highlights

    Featured Wii

    Featured iPhone

    Featured PSP/PS3

    Featured A/V

    Related Links

    Products Highlight

    Archives