.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

No access to SPEmailMessage Properties

Posted By:      Posted Date: October 18, 2010    Points: 0   Category :SharePoint


Hi all,


I have a curious error by accessing Properties of SPEmailMessage.


For example:


public override void EmailReceived( SPList list, SPEmailMessage emailMessage, string receiverData)

// receiverData ='';


View Complete Post

More Related Resource Links

Programmatic access to Assembly Version in Product Properties?

Using VS2008 and would like to get programmatic access to the Assembly Version property in my Project Properties but I can't seem to find a way to do this. Any suggestions? The project is a .dll and I want to expose this version information to the caller in my interface section as a string.

How to access properties in spworkflowproperties in the task?


In my task of a work flow, I need to access the original ItemUrl value.  this is a property in the spworkflowproperties class, but I cant seem to access it in my task (using aspx form for the task).  Is this jsut me missing something easy here?

(SP 2010 environment)



Rocky Sanders

SharePoint - Item - Edit Properties - Access Denied Error

I have a SharePoint 2007 EE Site  (with patches up to version running on Windows Server 2008 & SQL Server 2008.
I ported an existing site from a different domain to this server by backing up/restoring the content database. The site is running fine.

I added a new sub-site and here is where I have the issue. If I create a document library, add a document, and then use the drop-down on the item to pick "edit properties" I bounce to the SP Error: Access Denied screen. My account is a site admin and has full access to the sub-site.
I can view the properties fine.

When I try to upload a document I get the access denied error message if some of the meta data properties are marked "required". The document is still uploaded. I also get the same error when I try to edit an item in a list.

I can view/edit the properties in Data sheet view fine. The libraries on the existing sites work fine. It only seems to be an issue on new sub-sites.

It almost seems like a permission problem generating the property edit forms. There is nothing in the SP log files.

SummaryLinkWebPart : Access Denied saving Web Part properties after migration to Moss 2010


Hi everyone,

i got the error below when i access pages containing a SummaryLinkWebPart. The error occured only with user having non-administrative privilege.

The curious thing is that after an administrator access one of this pages, it starts to work for non-administrative users too.

The site collections containing these pages has been migrated from Moss 2007 to Moss 2010.

I'd like to find a better solution than navigate through all my pages with site collection administrator account.

Any suggestion would be very appreciate

Access Denied saving Web Part properties: either the Web Part is embedded directly in the page, or you do not have sufficient permissions to save properties

Can't access master page properties in Visual Studio


I have created a Master Page and exposed a Literal control on it by way of a public property.

    Public Property PageTitle() As Literal
            Return ltlTitle
        End Get
        Set(ByVal value As Literal)
            ltlTitle = value
        End Set
    End Property

In my content page I have referenced the Master Page like so :

<%@ Page Language="VB" MasterPageFile="~/Tools.master" AutoEventWireup="false" CodeFile="NewsletterUpload.aspx.vb" Inherits="NewsletterUpload" %>
<%@ MasterType VirtualPath="~/Tools.master" %>

However in my content page code behind I cannot see the custom properties of the master page in Visual Studio.

User Controls : load and access properties from code behind



I created a User Control :

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UCSousMenuPrincipal.ascx.cs"
    Inherits="view_usercontrols_UCSousMenuPrincipal" %>
<asp:DataList ID="dataListSousMenuPrincipal" runat="server" RepeatDirection="Horizontal" >
        <asp:HyperLink ID="HyperLink1" runat="server"><%# Container.DataItem %></asp:HyperLink>

to which I added a property, so I can bind the DataList :

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;

public partial class view_usercontrols_UCSousMenuPrincipal : System.Web.UI.UserControl
    //Private Member    
    private object dataSource = null;
    protected void Page_Load(object sender, EventArgs e)

MVC architecture in ASP.Net using C# and Microsoft Data Access Application block

The Model-View-Controller (MVC) pattern separates the modeling of the domain, the presentation, and the actions based on user input into three separate classes [Burbeck92]:

Model. The model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller).

View. The view manages the display of information.

Controller. The controller interprets the mouse and keyboard inputs from the user, informing the model and/or the view to change as appropriate.

WCF Tip: Using Properties in Service Contracts

you'll notice all of the Service Contracts are implemented with interfaces containing only methods. For the longest time I thought that's all that was supported, until I thought about it a little more. In C# land, properties are simply wrappers around a get method and set method, so why wouldn't we be able to use properties in a service contract? Well the answer is we can.

Automatic vs Explicit Properties

If the reason that motivated the change from automatically implemented property to explicitly implemented property was to change the semantics of the property then you should evaluate whether the desired semantics when accessing the property from within the class are identical to or different from the desired semantics when accessing the property from outside the class.

Dependency Properties

When you begin to develop appliations with WPF, you will soon stumble across DependencyProperties. They look quite similar to normal .NET properties, but the concept behind is much more complex and powerful

Store and Display Images from MS Access Database Using C#

There is only the difference of coding syntax to stream the binary data of image content type to upload it into MS Access Database using C#/VB in ASP.Net 2.0

Namespaces required:-
using System.Data.OleDb;

OleDb is used to connect the web site forms with MS Access Database using Microsoft.Jet.OLEDB.4.0

ASP.Net Upload Image to MS Access Database

As you learnt from the previous articles to upload image to the SQL Database in ASP.Net 2.0 and stream that image into the memory to retrieve it from the database and display it on the web page. In this article you will learn how to upload images to the MS Access database in ASP.Net 2.0

First of all create an Access Database and place it in the App_Data folder of ASP.Net web site project. Then create a table "tblImg" with the following fields:

Xml File Methods and Properties

Method and Properties of XmlTextWriter class:
The XmlWriter class is a base class that outputs an XML data structure. It has methods to sequentially write XML elements in a proper hierarchy to create an XML file or other types of output streams. The System.Xml namespace provides support for the XmlWriter. It must be imported to the ASP.NET page with the directive

<%@ Import Namespace="System.Xml" %>

The XmlTextWriter

XmlWriter is an abstract class that is implemented as an extended XMLTextWriter class. The XmlTextWriter writes a sequence of XML nodes one element at a time. Output can be written to an XML file, although other streams of output data can be produced. It can create a new file or overwrite an existing file. Its non-cached writing techniques provides very fast generation of an output stream.

Wrong Account being used to access files - Help - No Impersonation


I run a simple .aspx website on a Windows Server 2008 machine.

There is NO impersonation, and System.Security.Principal.WindowsIdentity.GetCurrent().Name returns NT AUTHORITY\NETWORK SERVICE, which it the account which the application pool runs. In my web.config, I have <authentication mode="Forms">.


I tried to test the security of the application and server by removing file permissions to the .aspx files. I was greatly worried when the website continued to run without problem (it should not have been able to read the .aspx files).

By turning on file level auditing, I discovered that the .aspx files were being read by the machine$ account (if the machine is called Serv1, then the files would be read by the Serv1$ account, which seems to have access to all files on the local machine).


Is this a security breach or is this behaviour by design ?

Please can somebody assist, as I am worried.

Disallow Direct Access To Files



Here is my dilema, on my site i have a WordPress Audio player (http://wpaudioplayer.com/standalone) that plays my mp3's.

It loads the Mp3's in by javascript...example below:

       AudioPlayer.embed("audioplayer_7", { soundFile: "/Files/Music/[name of file].mp3" });

This file name is clearly visible in the browser source. Not a problem, however this means that any user can legitimately browse to the file directly and download it.

Now i still need the mp3 player (which is flash) to have access to the file but if a user was to try accessing the file directly, they would not be allowed access to it.

I am not sure how to go about this, i am circling the idea of a httphandler but not sure if this is sufficiant to stop the direct access to the file.

Any help would be appreciated

How to access a new database ( which i created ) in isqlplus ?



I created a new database with the help of Database Configuration Assistant !

I created with the scott account

Now i'm not able to connect to the database with the connect identifier with the scott account

The error i get is.,

ERROR - ORA-12154: TNS:could not resolve the connect identifier specified.

Plz help !

Access SessionState: via App1 to SessionState from App2


Hi .NET'ers,

i'm interested to do the following - i geuss, i have no option to do that:

we have our "mainapplication" on a DB; we are tracking user-login status by switching a bit in the DB in the users data row.

we hvae a second application, the backend, which is the administration tool.

(the applications are put in seperate diretories on HD)

sometimes, we need to block/ban users. in some cases the users are logged in, when we "see them in action".

i'd like to build a button in the backend-application, which logss-out the user from the mainapplication.

for sure: i can access the same DB and switch the bit to "know" he's offline, but this will not kill the session on the mainapplication.

because: if a user is on/offline is also indicated by the session in the IIS.
and as the IIS-session is active, the user may be already banned - but he will not be logged out automatically (and showing something like "you have been logged out because of a ban)

one option would be to call the DB by each page-load to find out, if the user is logged on.

is there any option to implement this?

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