Tuesday, June 26, 2012

@ NetAssist–24 June 2012 (9.00 am–1.00 pm)–Day 1

Questions Asked ?

  • About partial and full trust environments
  • Offline Database in MS that can use for small applications
  • SharePoint Web Services
  • SharePoint Flavors
  • What is the authentication mechanism use by SharePoint in Windows7 as a development environment

@ NetAssist–24 June 2012 (9.00 am–1.00 pm)

10175-June-2012

Day One – Intro (24 June 2012 )

Thursday, June 21, 2012

Role Based Security Using Form Authentication in ASP.NET , <Location path=’’ > not working and Login page does not have permission for anonymous users

I have created ASP.net web based application using Form Authentication. I need a section with role privileges and login page should be access by all users. when I specify the authorization in default section my login page loaded with out CSS since those files do not have permissions.

Thus I used following approach and it worked for me.

    <system.web>
<
authentication mode="Forms" >
<
forms name="SomeName" loginUrl="Login.aspx"
slidingExpiration="true" protection="None"
path="/" defaultUrl="Home.aspx" timeout="20" >
</
forms>
</
authentication>
</
system.web>
    <!--Permision for the site-->
<
location allowOverride="true">
<
system.web>
<
authorization>
<
deny users ="?" />
</
authorization>
</
system.web>
</
location>

<!--
Permision for the Login page-->
<
location path="Login.aspx">
<
system.web>
<
authorization>
<
allow users ="*" />
</
authorization>
</
system.web>
</
location>

<!--
permision setting section-->
<
location path="Settings">
<
system.web>
<
authorization>
<
deny users ="?" roles="User"/>
</
authorization>
</
system.web>
</
location>

Friday, June 15, 2012

Grid View Need Two clicks to change to Edit Mode in Visual Studio

This is a common mistake I'm forgetting every time. so I thought to publish a post.

We need to bind the grid again after selecting the EditRowIndex.

protected void gridSettings_RowEditing(object sender, GridViewEditEventArgs e)
{
gridSettings.EditIndex = e.NewEditIndex;
loadReportGrid();
}

Central Administration Page gives Blank Page

I have recently installed SharePoint 2010 in Windows 7 Home premium as described in http://msdn.microsoft.com/en-us/library/ee554869.aspx

but it gave an a blank page when I tried to start the central administration page. then after searching in the Net I found that windows 7 home edition , premium edition and some other editions need to enable basic from authentication in the IIS.

image

therefore  click the the relevant central administration web site and go to authentication option and change the basic authentication enabled.

Monday, June 11, 2012

The file is being used by another program Excel InteropServices

Recently my friend faced a problem when automating a program that written using excel InteropServices. This program work perfectly in debug mode  and Windows XP. but when it try to automate using task scheduler in Windows 7 , Vista and upper version it is giving following errors.

  • The file name or path does not exist
  • The file is being used by another program
  • The workbook you are trying to save has the same name as the currently opened book
  • The file name or path does not exist
  • The file is being used by another program
  • The workbook you are trying to save has the same name as the currently opened book

So creating a Desktop Folder in a following path resolved the issue.

C:\Windows\System32\config\systemprofile\Desktop

Refer:http://social.msdn.microsoft.com/Forums/en/innovateonoffice/thread/b81a3c4e-62db-488b-af06-44421818ef91