.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 >> Windows Application >> Post New Question Subscribe to Interview Questions

What's the safest way to deploy a Windows Forms app?

Posted By :nishithraj     Posted Date :November 30, 2009    Points :10   Category :Windows Application 
One click deployment through web. We can implement security checking here.

You can also find related Interview Question to What's the safest way to deploy a Windows Forms app?  below: 

How you will Hide Column(s) in the Windows Forms DataGridView Control?

  
Set the DataGridViewColumn.Visible property to false.

vb.net:
-------
dataGridView1.Columns("CustomerID").Visible = False

c#.net:
------
dataGridView1.Columns["CustomerID"].Visible = False; (More...)

I can't seem to find System.Windows.Forms.Integration, where do I find it?

  
The System.Windows.Forms.Integration namespace is defined in WindowsFormsIntegration.dll which currently ships in the WinFX SDK, not in the standard redist. Therefore, the file will be found in "\Program Files\Reference Assemblies\ Microsoft\Avalon\v2.0.50215?. (More...)

Can I use Windows Forms in a WPF application?

  
Yes you can. You can have a WPF application pop a Windows Form much in the same way that you can pop a WPF window from a Windows Forms application. Furthermore, you can place Windows Forms controls side-by-side with WPF controls on a WPF window or page by using the WindowsFormsHost control that will ship as part of the interoperability layer. (More...)

How do I host a WPF control in a Windows Forms application?

  
add references to the WPF namespaces (PresentationCore, PresentationFramework, UIAutomationProvider, UIAutomationTypes, and WindowsBase). Next create an instance of the ElementHost control and the control you wish to embed in the Windows Forms application and then hook that control up to the ElementHost control. Then simply add the ElementHost control to your Forms control collection:

ElementHost host = new ElementHost();

System.Windows.Controls.ListBox wpfListBox = new System.Windows.Controls.ListBox();

for (int i = 0; i < 10; i++)

{

wpfListBox.Items.Add("Item " + i.ToString());

}

host.Dock = DockStyle.Fill;

host.Controls.Add(wpfListBox);

this.panel1.Controls.Add(host);

However, if you want to use XAML to describe the WPF control that you want to use in the Windows Forms application, you would need to add an Avalon UserControl item to your project. This will create a UserControl1.xaml file and a UserControl1.xaml.cs file. You can then modify the UserControl1.xaml file to contain whatever XAML you wish to describe your control. Then you would simply create an instance of this control and add it to the ElementHost control as in the above example:

ElementHost host = new ElementHost();

UserControl1 uc1 = new UserControl1();

host.Controls.Add(uc1);

host.Dock = DockStyle.Fill;

this.panel1.Controls.Add(host);

In addition, you will need to modify the project file because the Windows Application does not what to do with the XAML file. You will need to open the project file (.csproj, .vbproj, etc.) in an editor like Notepad and then scroll to the bottom. You will see the following line:



You will need to copy this line and paste it just below the above line and then change "CSharp" to "WinFX" so that the two lines look like:





Now save this file and reload the project using VS and run the application. (More...)

What could be the solution of one click deployment in windows forms?

  
ClickOnce deployment tool is the solution of one click deployment in windows forms Application (More...)

How would you deploy WebPart Using Windows PowerShell?

  
At the Windows PowerShell command prompt (PS C:\>), type the below command :

Install -SPWebPartPack -LiteralPath "FullPathofCabFile" -Name "Nameof WebPart" (More...)

Which authentication mode lets you use both SQL Server logins and Windows logins?

  
Mixed Mode authentication mode lets you use both SQL Server logins and Windows logins? (More...)

Is the .NET Framework just a new name for Windows DNA?

  
No. Windows DNA is architecture for building tightly-coupled, distributed Web applications. As the needs of distributed applications changed to require more loosely-coupled principles, Microsoft evolved the architecture to .NET. The .NET Framework is a part of the .NET architecture. (More...)

What options are available to deploy my .NET applications?

  
The .NET Framework simplifies deployment by making zero-impact install and XCOPY deployment of applications feasible. Because all requests are resolved first to the private application directory, simply copying an application's directory files to disk is all that is needed to run the application. No registration is required.
This scenario is particularly compelling for Web applications, Web Services, and self-contained desktop applications. However, there are scenarios where XCOPY is not sufficient as a distribution mechanism. An example is when the application has little private code and relies on the availability of shared assemblies, or when the application is not locally installed (but rather downloaded on demand). For these cases, the .NET Framework provides extensive code download services and integration with the Windows Installer. The code download support provided by the .NET Framework offers several advantages over current platforms, including incremental download, code access security (no more Authenticode dialogs), and application isolation (code downloaded on behalf of one application doesn't affect other applications). The Windows Installer is another powerful deployment mechanism available to .NET applications. All of the features of Windows Installer, including publishing, advertisement, and application repair will be available to .NET applications in Windows Installer 1.5. (More...)

I have written an assembly that I want to use in more than one application. Where do I deploy it?

  
Assemblies that are to be used by multiple applications (for example, shared assemblies) are deployed to the global assembly cache. In the prerelease and Beta builds, use the /i option to the Alink SDK tool to install an assembly into the cache:
al /i:myDll.dll
A future version of the Windows Installer will be able to install assemblies into the global assembly cache. (More...)

Windows Authentication

  
This type of authentication is possibly the easiest of all to implement. Windows authentication can be used in conjunction with almost all authentication methods provided by IIS (e.g. Basic, Digest, NTLM or Kerberos Authentication), except Anonymous Authentication [2,4]. There is no need to write any code to validate the user as IIS has already authenticated their Windows credentials. Basically, Windows authentication makes use of the authentication capabilities of IIS. IIS will complete its authentication first then ASP.NET will use the authenticated identity's token to decide whether the access is granted or denied.
This mechanism is usually implemented when the users are part of Windows domain and the authenticated users are to be impersonated so that the code is executed in the same security context of the user's Windows account [4].
When a user requests specific resources, this request will go to IIS. IIS authenticates the user and attaches the security token to it. It will then pass the authenticated request and security token to ASP.NET. If impersonation is enabled, ASP.NET impersonates the user using the security token attached and sees whether the user is authorized to access the resources in the section in Web.config file. If the access is granted, ASP.NET will send the requested resources through IIS, or else, it sends error message to the user.


Shashi Ray (More...)

Forms-Based Authentication

  
Forms-based authentication is used to implement customized logic for authenticating users without having to worry about session management using cookie. It gives developer more access to specify which files on the site can be accessed and by whom, and allows identification of a login page [3,7].
This mechanism will automatically redirect the unauthenticated user to login page and ask them to provide proper credentials (e.g. username/password combination). If login is successful, ASP.NET then issues the cookie to the user and redirects them to specific resources that they originally requested. This cookie allows the user to revisit particular protected resources without having to repeatedly log in.

Shashi Ray (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