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


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> SharePoint >> Post New Question Subscribe to Interview Questions

How would you pass user credentials while using SharePoint WebService from your Web Part or application.

Posted By :Gowthammanju     Posted Date :October 31, 2011    Points :40   Category :SharePoint 
Ans. The web service needs credentials to be set before making calls.

Examples:

listService.UseDefaultCredentials = true; // use currently logged on user

listService.Credentials = new System.Net.NetworkCredential("user", "pass", "domain"); // use specified user

You can also find related Interview Question to How would you pass user credentials while using SharePoint WebService from your Web Part or application.  below: 

What is a web part zone in SharePoint?

  
Web part zones in SharePont are what your web parts reside in and help categorize your web parts when designing a page. (More...)

What are the differences between web part page gallery, site gallery,Virtual server gallery and online gallery in SharePoint?

  
Web Part Page Gallery in SharePoint is the default gallery provided by Microsoft that comes installed with SharePoint. Site Gallery is specific to one sharepoint website site. Virtual Server gallery is specific to that virtual server and online gallery is available for download web parts from MSDN. (More...)

Any User outside of organization to participate in my Windows SharePoint Services site

  
Yes. You can manage this process using the Administration Site Settings. Simply add users via their e-mail alias and assign permissions such as Reader or Contributor. (More...)

How customizable is the user-to-user access in SHarePoint?

  
User permissions apply to an entire SharePoint Website, not to documents themselves. However, you can have additional sub webs that can optionally have their own permissions. Each user can be given any offer default roles. Additional roles can be defined by the administrator. (More...)

Can each user have access to their own calendar in a SharePoint Website?

  
Yes there are two ways to do this,
* by creating a calendar for each user, or
* by creating a calendar with a view for each user. (More...)

Which might not work if a user has disabled cookies in his or her Web browser: application state or session state?

  
Session state, by default, won't work if a Web browser that supports cookies has cookies disabled. Application state isn't user-specific, though, and doesn't need to be tracked in cookies. Therefore, application state works regardless of cookies. (More...)

Which might not work if a user has disabled cookies in his or her Web browser: application state or session state?

  
Session state, by default, won't work if a Web browser that supports cookies has cookies disabled. Application state isn't user-specific, though, and doesn't need to be tracked in cookies. Therefore, application state works regardless of cookies (More...)

You are designing a GUI application with a window and several widgets on it. The user then resizes the app window and sees a lot of grey space, while the widgets stay in place. What's the problem?

  
One should use anchoring for correct resizing. Otherwise the default property of a widget on a form is top-left, so it stays at the same location when resized. (More...)

How to pass a value from a method to a property procedure in c# win application?

  
Here is my code:

class Jewellery : Connectionstr
{

string lmcode;

public string LM_code//Here i want to access the value of the method(ReadData) i.e displaystring and store the value in to the insert query below.
{
get { return lmcode; }
set { lmcode = value; }

}


string mname;
public string M_Name
{
get { return mname; }
set { mname = value; }
}

string desc;
public string Desc
{
get { return desc; }
set { desc = value; }
}


public string ReadData()
{
OleDbDataReader dr;
string jid = string.Empty;
string displayString = string.Empty;
String query = "select max(LM_code)from Master_Accounts";
Datamanager.RunExecuteReader(Constr, query);

if (dr.Read())
{
jid = dr[0].ToString();
if (string.IsNullOrEmpty(jid))
{
jid = "AM0000";
}
int len = jid.Length;
string split = jid.Substring(2, len - 2);
int num = Convert.ToInt32(split);
num++;
displayString = jid.Substring(0, 2) + num.ToString("0000");
dr.Close();
}
return displayString;//I want to pass this value to the proeprty proc above i.e LM_code.
}

public void add()
{

String query ="insert into Master_Accounts values ('" + LM_code + "','" + M_Name + "'," + "'" + Desc "')";
Datamanager.RunExecuteNonQuery(Constr , query);

} (More...)

What is purpose to use Graphical user interface application?

  
Because the use of Graphical user interface application user friendly.
And easy to interact with application and users.
Also maintain very to other user. (More...)

Real software is developing a speech-based user interface for blind people. However, speech based interface are difficult to design and time given by the client is short. To develop a functional interface without any errors, the company wants to first evaluate the prototype. They used the storyboard technique to demonstrate the functionality of the application. However, this technique was unable to demonstrate the interactive feature of the application. Analyze and provide solution for the above scenario?

  
1, The design team of Real software should have used the Sketching technique because storyboard technique would only provide the flow and features of the interface.

2, The design team of Real software should have used the Horizontal Prototyping because storyboard technique would only provide the flow of the interface.

3, The design team of Real software should have used the Wizard of Oz technique because storyboard technique would only provide the flow and features of the interface

4, The design team of Real software should have used the Vertical Prototyping because storyboard technique would only provide the flow of the interface.


Answer : 3 (More...)

When retrieving List items using SharePoint Web Services, how do you specify explicit credentials to be passed to access the list items?

  
In order to specify explicit credentials with a Web Service, you generally instantiate the web service, and then using the credentials properties of the Web Service object you use the System.Net.NetworkCredential class to specify the username, password, and domain that you wish to pass when making the web service call and operations.
(More...)

What are Application Pages in SharePoint?

  

Ans. Unlike site pages (for example, default.aspx), a custom application page is deployed once per Web server and cannot be customized on a site-by-site basis. Application pages are based in the virtual _layouts directory. In addition, they are compiled into a single assembly DLL.
A good example of an Application Page is the default Site Settings page: every site has one, and it's not customizable on a per site basis (although the contents can be different for sites).
With application pages, you can also add inline code. With site pages, you cannot add inline code. (More...)

How do you deploy a User Control in SharePoint ?

  

Ans. You deploy your User Control either by a Custom webpart, which will simply load the control on the page or can use tools like SmartPart, which is again a webpart to load user control on the page. User Control can be deployed using a custom solution package for the webapplication or you can also the control in the webpart solution package so that it gets deployed in _controlstemplate folder (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend