ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2018 www.aspforums.com. All rights reserved.you can not start the application it has already installed in different location<p>I have developed a VB.net application. installing in windows server 2008 to share the application. I use the oneclick install the application. Other users can not use the application.</p> <p>when chick the shortcut, the error say, 'you can not start the application, it has already installed in different location'</p> <p>&nbsp;</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/914984/you-can-not-start-the-application-it-has-already-installed-in-different-location/https://www.aspforums.net:443/Threads/914984/you-can-not-start-the-application-it-has-already-installed-in-different-location/Mon, 21 May 2012 09:33:14 GMTXaml combobox in C# windows application<p>Hi! I want use xaml create check combobox and fill data from database in c# windows application with example. Can anybody help me? Because I read this article&nbsp;<a href="https://www.c-sharpcorner.com/UploadFile/mahesh/wpf-combobox/">https://www.c-sharpcorner.com/UploadFile/mahesh/wpf-combobox/</a>, but I didn't understand where I must write code.</p>https://www.aspforums.net:443/Threads/129265/Xaml-combobox-in-C-windows-application/https://www.aspforums.net:443/Threads/129265/Xaml-combobox-in-C-windows-application/Wed, 28 Nov 2018 23:04:03 GMTWrite to Event Log using Windows Service in C# and VB.Net<p>how to write eventlog in windows servies and where can i get log file</p> <p>and how to use threading</p>https://www.aspforums.net:443/Threads/440844/Write-to-Event-Log-using-Windows-Service-in-C-and-VBNet/https://www.aspforums.net:443/Threads/440844/Write-to-Event-Log-using-Windows-Service-in-C-and-VBNet/Tue, 04 Aug 2015 02:31:08 GMTWinForms Reports using DevExpress Reporting<p>how to make report in windows form using dev express&nbsp;</p>https://www.aspforums.net:443/Threads/195872/WinForms-Reports-using-DevExpress-Reporting/https://www.aspforums.net:443/Threads/195872/WinForms-Reports-using-DevExpress-Reporting/Sun, 14 Aug 2016 06:00:28 GMTWindows Service to host Post Request<p>Dear All,</p> <p>with my pervious question&nbsp;<a href="https://www.aspforums.net/Threads/111256/HTTP-Post-Request/">https://www.aspforums.net/Threads/111256/HTTP-Post-Request/</a></p> <p>I want to create windows service for the above question. Can you please suggest me how can I proceed.</p> <p>Thanks</p>https://www.aspforums.net:443/Threads/139268/Windows-Service-to-host-Post-Request/https://www.aspforums.net:443/Threads/139268/Windows-Service-to-host-Post-Request/Wed, 28 Nov 2018 03:12:41 GMTWindows Forms Application Error: Attempted to perform an unauthorized operation<p>I'm trying to write log file once application(winform) start and some oprations going on at background.</p> <p>It's working fine with Visual Studio, but once I create exe file and run it... it gives an error of attempted to perform an unauthorized operation c# winform log file</p> <p>Is there any other way arround to give access of instattion folder once application installed to the user's machine?</p> <p>Here is my code: </p> <pre class="brush: csharp">public SplashScreen() { InitializeComponent(); GrantAccess(); } private void GrantAccess() { try { var path = Path.GetDirectoryName(Application.StartupPath); DirectoryInfo dInfo = new DirectoryInfo(path); DirectorySecurity dSecurity = dInfo.GetAccessControl(); dSecurity.AddAccessRule(new FileSystemAccessRule(new SecurityIdentifier(WellKnownSidType.WorldSid, null), FileSystemRights.FullControl, InheritanceFlags.ObjectInherit | InheritanceFlags.ContainerInherit, PropagationFlags.NoPropagateInherit, AccessControlType.Allow)); dInfo.SetAccessControl(dSecurity); } catch (Exception ex) { Console.WriteLine(ex); Console.ReadLine(); } }</pre> <p><img src="http://imgr.es/42NN" alt="" /></p>https://www.aspforums.net:443/Threads/500369/Windows-Forms-Application-Error-Attempted-to-perform-an-unauthorized-operation/https://www.aspforums.net:443/Threads/500369/Windows-Forms-Application-Error-Attempted-to-perform-an-unauthorized-operation/Wed, 10 Jan 2018 00:18:28 GMTWindows Form Error: Unable to run or unstall the application the application requires that assembly CrystalDecesions.ReportAppSaver.CommonObjectModel<p>getting this error after creating exe file help please...</p> <p>unable to run or unstall the application. the application requires that assembly CrystalDecesions.ReportAppSaver.CommonObjectModel Version 13.0.3500.0 be installed in the Global Assembly Cache (GAC) first. pls help...</p>https://www.aspforums.net:443/Threads/107588/Windows-Form-Error-Unable-to-run-or-unstall-the-application-the-application-requires-that-assembly-CrystalDecesionsReportAppSaverCommonObjectModel/https://www.aspforums.net:443/Threads/107588/Windows-Form-Error-Unable-to-run-or-unstall-the-application-the-application-requires-that-assembly-CrystalDecesionsReportAppSaverCommonObjectModel/Mon, 19 Feb 2018 04:41:09 GMTWindows Service Scheduler.cs Code Problem<p>Hi ,</p> <p>&nbsp; &nbsp;This is my Scheduler.cs Code&nbsp;</p> <p>&nbsp;</p> <pre class="brush: csharp"> private Timer timer1 = null; public Scheduler() { InitializeComponent(); } protected override void OnStart(string[] args) { timer1 = new Timer(); this.timer1.Interval = 30000; this.timer1.Elapsed += new System.Timers.ElapsedEventHandler(this.timer1_Tick); this.timer1.Enabled = true; Library.WriteErrorLog(&#34;Service Has Been Started&#34;); } private void timer1_Tick(object sender, ElapsedEventArgs e) { Library.WriteErrorLog(&#34;Timer ticked and some job doing&#34;); sendEmailNotification(); Library.WriteErrorLog(&#34;Timer ticked and some job Completed&#34;); } private bool sendEmailNotification() { bool isSend = false; try { MailMessage message = new MailMessage(); message.To.Add(&#34;xxx@gmail.com&#34;); // if (!string.IsNullOrEmpty(dEmail.CC)) message.CC.Add(&#34;xxxx@gmail.com&#34;); //if (!string.IsNullOrEmpty(dEmail.BCC)) // message.Bcc.Add(dEmail.BCC); message.Subject = &#34;Tezting&#34;; message.Body = &#34;Testing&#34;; message.IsBodyHtml = true; SmtpClient smtp = new SmtpClient(); smtp.Send(message); isSend = true; } catch (Exception ex) { throw (ex); } return isSend; } protected override void OnStop() { timer1.Enabled = false; Library.WriteErrorLog(&#34;Teh window service has been stopped&#34;); }</pre> <p>Problem : In my log file its always printing like beloow:</p> <p>&nbsp;</p> <p>&nbsp;</p> <pre class="brush: csharp">4/6/2016 12:41:23 PMService Has Been Started 4/6/2016 12:41:53 PMTimer ticked and some job doing 4/6/2016 12:42:23 PMTimer ticked and some job doing 4/6/2016 12:42:53 PMTimer ticked and some job doing 4/6/2016 12:43:23 PMTimer ticked and some job doing 4/6/2016 12:43:53 PMTimer ticked and some job doing 4/6/2016 12:44:23 PMTimer ticked and some job doing 4/6/2016 12:44:53 PMTimer ticked and some job doing 4/6/2016 12:45:23 PMTimer ticked and some job doing 4/6/2016 12:45:53 PMTimer ticked and some job doing</pre> <p>its always printing job is doing...but not completed message&nbsp;</p>https://www.aspforums.net:443/Threads/207510/Windows-Service-Schedulercs-Code-Problem/https://www.aspforums.net:443/Threads/207510/Windows-Service-Schedulercs-Code-Problem/Wed, 06 Apr 2016 01:52:43 GMTWindows service run first time then stop<p>my window service is running only once .after that its not scheduling for next time.</p> <pre class="brush: sql">using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Configuration; using System.Data.SqlClient; using System.Data; using GenSQL; namespace Udyog_Bandhu_Service { public class UdyogBandhu { static string SourceConStr = ConfigurationManager.ConnectionStrings[&#34;EODBService&#34;].ConnectionString; static UdyogBandhu() { } public void UpdatePayments() { try { DBHelper SourceDBHelper = new DBHelper(SourceConStr); UPSwpNiveshMitraServices.upswp_niveshmitraservicesSoapClient client = new UPSwpNiveshMitraServices.upswp_niveshmitraservicesSoapClient(); DataTable dtPayment = SourceDBHelper.ExecuteDataTableProc(&#34;PROC_getPaymentDetails_WindowService&#34;, null); if (dtPayment.Rows.Count &gt; 0) { UdyogBandhuService.WriteToFile(&#34;Success : {0}&#34; + dtPayment.Rows.Count); foreach (DataRow item in dtPayment.Rows) { // DataSet ds = client.WGetUBPaymentDetails(Convert.ToString(item[&#34;Control_ID&#34;]), Convert.ToString(item[&#34;Unit_Id&#34;]), Convert.ToString(item[&#34;ServiceID&#34;]), Convert.ToString(item[&#34;passsalt&#34;])); DataSet ds = client.WGetUBPaymentDetails(&#34;UPSWP170000411&#34;, &#34;UPSWP17000041101&#34;, &#34;SC06002&#34;, &#34;fcf18dfd1405fbe78ff459e85e7b96&#34;); if (ds != null &amp;&amp; ds.Tables[0].Rows.Count == 1) { if (Convert.ToString(ds.Tables[0].Rows[0][&#34;Status_Code&#34;]) == &#34;11&#34;) { SqlParameter[] param = new SqlParameter[]{ new SqlParameter(&#34;@Control_ID&#34;,ds.Tables[0].Rows[0][&#34;Control_ID&#34;]), new SqlParameter(&#34;@Unit_Id&#34;,ds.Tables[0].Rows[0][&#34;Unit_Id&#34;]), new SqlParameter(&#34;@Service_ID&#34;,ds.Tables[0].Rows[0][&#34;Service_ID&#34;]), new SqlParameter(&#34;@ProcessIndustryID&#34;,ds.Tables[0].Rows[0][&#34;ProcessIndustryID&#34;]), new SqlParameter(&#34;@ApplicationID&#34;,ds.Tables[0].Rows[0][&#34;ApplicationID&#34;]), new SqlParameter(&#34;@Fee_Amount&#34;,ds.Tables[0].Rows[0][&#34;Fee_Amount&#34;]), new SqlParameter(&#34;@Fee_Status&#34;,ds.Tables[0].Rows[0][&#34;Fee_Status&#34;]), new SqlParameter(&#34;@Transaction_ID&#34;,ds.Tables[0].Rows[0][&#34;Transaction_ID&#34;]), new SqlParameter(&#34;@Transaction_Date&#34;,ds.Tables[0].Rows[0][&#34;Transaction_Date&#34;]), new SqlParameter(&#34;@Transaction_Time&#34;,ds.Tables[0].Rows[0][&#34;Transaction_Time&#34;]), new SqlParameter(&#34;@Transaction_DateTime&#34;,ds.Tables[0].Rows[0][&#34;Transaction_DateTime&#34;]), new SqlParameter(&#34;@Status_Code&#34;,ds.Tables[0].Rows[0][&#34;Status_Code&#34;]), new SqlParameter(&#34;@Remarks&#34;,ds.Tables[0].Rows[0][&#34;Remarks&#34;]), }; DataTable dtResult = SourceDBHelper.ExecuteDataTableProc(&#34;Proc_InsertUpdatePaymentDetails_UB_WindowService&#34;, param); if (dtResult != null &amp;&amp; dtResult.Rows.Count &gt; 0) { if (Convert.ToString(dtResult.Rows[0][&#34;Flag&#34;]) == &#34;1&#34;) { UdyogBandhuService.WriteToFile(&#34;Success Message {0} &#34; + dtResult.Rows[0][&#34;Msg&#34;]); } else { UdyogBandhuService.WriteToFile(&#34;Info Message {0} &#34; + dtResult.Rows[0][&#34;Msg&#34;]); } UdyogBandhuService objser = new UdyogBandhuService(); objser.ScheduleService(); } } } else { UdyogBandhuService.WriteToFile(&#34;Info Message : No Record Found from Udyog Bandhu Service.&#34;); } } } else { UdyogBandhuService.WriteToFile(&#34;Info Message : There is no record found to update from Database.&#34;); } } catch (Exception ex) { UdyogBandhuService.WriteToFile(&#34;ERROR AT {0} &#34; + ex.Message); } } #region WriteToFileLog public static void WriteLog(string log, string type) { try { } catch (Exception ex) { UdyogBandhuService.WriteToFile(&#34;ERROR AT {0} \n Log:&#34; + log + &#34; \n Message:&#34; + ex.Message); } } #endregion } } </pre> <p>&nbsp;</p> <pre class="brush: xml"> &lt;appSettings&gt; &lt;!--&lt;add key =&#34;Mode&#34; value =&#34;DAILY&#34;/&gt;--&gt; &lt;add key=&#34;Mode&#34; value=&#34;Interval&#34; /&gt; &lt;add key=&#34;IntervalMinutes&#34; value=&#34;1&#34; /&gt; &lt;add key=&#34;ScheduledTime&#34; value=&#34;19:01:00&#34; /&gt; &lt;add key=&#34;ScheduledTimes&#34; value=&#34;10:00:00,10:30:00,10:45:00,11:00:00,11:15:00,11:30:00,12:30:00,15:15:00,15:45:00,16:00:00,17:00:00,17:15:00,18:00:00,19:00:00,20:00:00&#34; /&gt; &lt;add key=&#34;ErrorLogPath&#34; value=&#34;C:\\EODB\\ServiceLog.txt&#34;/&gt; &lt;add key=&#34;isAllowed&#34; value=&#34;Y&#34;/&gt; &lt;/appSettings&gt;</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/174935/Windows-service-run-first-time-then-stop/https://www.aspforums.net:443/Threads/174935/Windows-service-run-first-time-then-stop/Wed, 31 Jan 2018 06:04:55 GMTWindows Forms: Procedure or function has too many arguments specified.<p>im working with this code;</p> <p>&nbsp;</p> <p><strong>&nbsp;i have stored procedure :</strong></p> <p>&nbsp;</p> <pre class="brush: vb">ALTER PROCEDURE [dbo].[Insert_target] @year_covered int, @region int, @province int, @project int, @municipality varchar(50), @subproject varchar(50), @allocation int, @target_new int, @target_restore int, @target_rehab int, @target_fb int, @target_job int, @idd int output AS BEGIN SET NOCOUNT ON; Insert into tbltarget (year_covered, region, province, municipality, project, subproject, allocation, target_new, target_restore, target_rehab, target_fb, target_job)&nbsp;</pre> <pre class="brush: vb"><span style=&#34;font-size: 9pt;&#34;>values (@year_covered,@region,@province,@municipality,</span><span style=&#34;font-size: 9pt;&#34;> @project,@subproject,@allocation,@target_new,@target_restore,@target_rehab,@target_fb,@target_job)</span></pre> <pre class="brush: vb"> set @idd = scope_identity() return @idd END</pre> <pre class="brush: vb">&nbsp;</pre> <pre class="brush: vb">&nbsp;</pre> <p><strong>My Code :&nbsp;</strong></p> <p>&nbsp;</p> <p>&nbsp;</p> <pre class="brush: vb">For Each lv In ListView1.Items dbCommand.CommandType = CommandType.StoredProcedure dbCommand.CommandText = &#34;Insert_target&#34; dbCommand.Parameters.AddWithValue(&#34;@year_covered&#34;,CInt(ListView1.Items(i).Text.ToString)) dbCommand.Parameters.AddWithValue(&#34;@region&#34;, CInt(REGION)) dbCommand.Parameters.AddWithValue(&#34;@province&#34;, CInt(PROVINCE)) dbCommand.Parameters.AddWithValue(&#34;@municipality&#34;, ListView1.Items(i).SubItems(6).ToString) dbCommand.Parameters.AddWithValue(&#34;@project&#34;, CInt(PROJECT)) dbCommand.Parameters.AddWithValue(&#34;@subproject&#34;, ListView1.Items(i).SubItems(7).ToString) dbCommand.Parameters.AddWithValue(&#34;@allocation&#34;, CInt(ListView1.Items(i).SubItems(8).Text.ToString)) dbCommand.Parameters.AddWithValue(&#34;@target_new&#34;, CInt(ListView1.Items(i).SubItems(9).Text.ToString)) dbCommand.Parameters.AddWithValue(&#34;@target_restore&#34;, CInt(ListView1.Items(i).SubItems(10).Text.ToString)) dbCommand.Parameters.AddWithValue(&#34;@target_rehab&#34;, CInt(ListView1.Items(i).SubItems(11).Text.ToString)) dbCommand.Parameters.AddWithValue(&#34;@target_fb&#34;, CInt(ListView1.Items(i).SubItems(12).Text.ToString)) dbCommand.Parameters.AddWithValue(&#34;@target_job&#34;, CInt(ListView1.Items(i).SubItems(13).Text.ToString)) dbCommand.Parameters.Add(&#34;@idd&#34;, SqlDbType.Int).Direction = ParameterDirection.Output dbCommand.Connection = dbConnection Try dbCommand.ExecuteNonQuery() Dim ids As String = dbCommand.Parameters(&#34;@idd&#34;).Value.ToString Catch ex As Exception MessageBox.Show(ex, MessageBoxButtons.OK, MessageBoxIcon.Information) End Try Next</pre> <p>Im hoping someone could help me... &nbsp;</p>https://www.aspforums.net:443/Threads/397574/Windows-Forms-Procedure-or-function-has-too-many-arguments-specified/https://www.aspforums.net:443/Threads/397574/Windows-Forms-Procedure-or-function-has-too-many-arguments-specified/Tue, 17 Sep 2013 03:46:17 GMTWindows Forms DataGridView has 3 columns but need to insert data for 5 columns<p>Hi</p> <p>I am making a windows application in which user enters details through gridview there are 3 grid view 2 of entering data correctly but 3 gridview size is small so i cant bind all colums there i have bind only 3 columns there are total 5 columns in total&nbsp; is there any way to enter ther remaining columns data .</p>https://www.aspforums.net:443/Threads/213660/Windows-Forms-DataGridView-has-3-columns-but-need-to-insert-data-for-5-columns/https://www.aspforums.net:443/Threads/213660/Windows-Forms-DataGridView-has-3-columns-but-need-to-insert-data-for-5-columns/Tue, 27 Nov 2012 03:24:50 GMTWindows Form Error: Invalid Cloumn Name Date in C#<p>&nbsp;Error&nbsp;iNVALID COLUMN NAME DATE</p> <pre class="brush: csharp"> public PrintBillsAll() { InitializeComponent(); } private void btnLoad_Click(object sender, EventArgs e) { using (IDbConnection db = new SqlConnection(ConfigurationManager.ConnectionStrings[&#34;cn&#34;].ConnectionString)) { if (db.State == ConnectionState.Closed) db.Open(); string query = &#34; Select Bill_No , Name, Address, MobileNo,Sl_No,ItemName,Size,Quantity,Rate,Amount,Total_Amount,Payment,Balance,Date&#34; + &#34;from SALES&#34; + $&#34; where Date between &#39;{dtFromDate.Value}&#39; and &#39;{ dtToDate.Value}&#39;&#34;; billinginfoBindingSource.DataSource = db.Query&lt;Billinginfo&gt;(query, commandType: CommandType.Text); } }</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/200102/Windows-Form-Error-Invalid-Cloumn-Name-Date-in-C/https://www.aspforums.net:443/Threads/200102/Windows-Form-Error-Invalid-Cloumn-Name-Date-in-C/Fri, 27 Apr 2018 06:38:00 GMTWindows form controlscontainer in asp.Net c#<p>Im new in Windows form application.</p> <p>I want to know that how i can <strong>control the position, size, orientation of the controls/containers</strong> used in windows form, asp.net c#.</p> <p>i.e., 1) On <strong>increasing the form size</strong>, <strong>container/control size also increase</strong> (as per defined)</p> <p>2) On <strong>decreasing the form size</strong>, container/control size <strong>retain in its same orientation</strong> (as per defined)</p> <p>please help me in understanding.</p> <p>please reply.</p>https://www.aspforums.net:443/Threads/784417/Windows-form-controlscontainer-in-aspNet-c/https://www.aspforums.net:443/Threads/784417/Windows-form-controlscontainer-in-aspNet-c/Fri, 27 Dec 2013 02:27:05 GMTWindows Form Application: Controls not visible in Visual Studio designer<p>i am not able to see the controls on windows form..only .cs code are visible&nbsp;</p>https://www.aspforums.net:443/Threads/800364/Windows-Form-Application-Controls-not-visible-in-Visual-Studio-designer/https://www.aspforums.net:443/Threads/800364/Windows-Form-Application-Controls-not-visible-in-Visual-Studio-designer/Tue, 18 Sep 2018 23:59:16 GMTWindows error when using visual studio<p>Respected sir&nbsp;</p> <p>When ever i run visual studio (any version), windows application works f9 but when i work on web application and run them couple of times (to see the webpage and test coding) my system crashes and i get following error.</p> <p>Blue screen appears with this error</p> <p>&nbsp;irql_not_less_or_equal(tcpip.sys).</p> <p>and system restarts.</p> <p>I am using windows 8.and AVG as antivirus.</p> <p>Sir please help i am not able to work.</p>https://www.aspforums.net:443/Threads/181037/Windows-error-when-using-visual-studio/https://www.aspforums.net:443/Threads/181037/Windows-error-when-using-visual-studio/Sat, 21 Sep 2013 23:32:51 GMTWindows Console program to print 1- 10 digits and some specific text for 4th digit using C#<p>hi all,</p> <p>&nbsp;</p> <p>i have a few douts am trying ascending order program using c#.</p> <p>actually i done this program by the&nbsp; given below output of ascending order</p> <p>output:</p> <p>1 2 3 4 5 6 7 8 9 10</p> <p>my question is :</p> <p>i need to display the message the one who is reach 4 in the order of output which i mentioned above.</p> <p>my message should be like this (" you have been reached 4th position of ascending order")</p> <p>after getting the 4 th postions the code again will start execute the reamining order which means 5th,6th,7th,8th,9th and 10th</p> <p>&nbsp;</p> <p>my expected output is:</p> <p>1</p> <p>2</p> <p>3</p> <p>(" you have been reached 4th position of ascending order")</p> <p>5</p> <p>6</p> <p>7</p> <p>8</p> <p>9</p> <p>10</p> <p>&nbsp;</p> <p>please find out my code below and were i alter my code below. please let me know,advice are very appreciable</p> <p>my code is:</p> <p>&nbsp;</p> <pre class="brush: csharp">using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { int i = 0; while(i&lt;10) { i = i + 1; Console.WriteLine(i); Console.ReadLine(); } } } } </pre> <p>&nbsp;</p> <p>thanks in advance..</p>https://www.aspforums.net:443/Threads/507462/Windows-Console-program-to-print-1--10-digits-and-some-specific-text-for-4th-digit-using-C/https://www.aspforums.net:443/Threads/507462/Windows-Console-program-to-print-1--10-digits-and-some-specific-text-for-4th-digit-using-C/Thu, 04 Jul 2013 05:47:34 GMTWindows Console Application - Access private method in to the main function<p>hi all,</p> <p>Am new in c# console application , i have a few clarification that is ,</p> <p>is there any possibility to access private method in to the main function</p> <p>my code below:</p> <p>&nbsp;</p> <pre class="brush: csharp">using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { } public class c : Program { private void sample() { Console.WriteLine(&#34;hi&#34;); Console.ReadKey(); } } } } </pre> <p>thanks in advance.</p>https://www.aspforums.net:443/Threads/139543/Windows-Console-Application---Access-private-method-in-to-the-main-function/https://www.aspforums.net:443/Threads/139543/Windows-Console-Application---Access-private-method-in-to-the-main-function/Fri, 20 Sep 2013 04:02:08 GMTWindows Authentication and Roles<p>Hi Mudassar Khan,</p> <p>I am developing a website which requires windows authentication.I have to configure the webiste in such a way that there is only one user with admin privileges and rest of the user should have only read access.This should be done without the user logging in manually using windows authentication method.The requirement is there should be two roles Admin and User.</p> <p>Also Please provide an Example on Membership and role in aspsnippets.com website.</p> <p>Please provide suggestions to implement this. Thanks in Advance.</p> <p>&nbsp;</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/899231/Windows-Authentication-and-Roles/https://www.aspforums.net:443/Threads/899231/Windows-Authentication-and-Roles/Sat, 14 Dec 2013 11:08:52 GMTWindows Application WindowsIdentity.GetCurrent().Name- Get only UserName and not Domain<p>hi</p> <p>I am writing this code</p> <pre class="brush: csharp">LBEmpName.Text = WindowsIdentity.GetCurrent().Name;</pre> <p></p> <p>&nbsp;</p> <p>But i want to display only user name wt should i do.<br /><br /></p>https://www.aspforums.net:443/Threads/144054/Windows-Application-WindowsIdentityGetCurrentName--Get-only-UserName-and-not-Domain/https://www.aspforums.net:443/Threads/144054/Windows-Application-WindowsIdentityGetCurrentName--Get-only-UserName-and-not-Domain/Tue, 09 Oct 2012 08:33:01 GMTWindows Application Error: OleDbCommand.Prepare method requires all parameters to have an explicitly set type<div>Hello, i want to update record ( based on condtion in sql query ) from DataGridView. i used the update method and i tried some code but it shows me below error on update method</div> <div>&nbsp;</div> <div>OleDbCommand.Prepare method requires all parameters to have an explicitly set type.</div> <pre class="brush: csharp"> OleDbDataAdapter da; DataSet ds = null; BindingSource bsource = new BindingSource(); public void BindData() { OleDbCommand cmd = new OleDbCommand(&#34;select srno,AccNumber,Admission_Fee,Family_fund,MonthlyCollection,MonthlyDeposit,Fund,SimpleLoanBal,SimpleInstallment,SimpleInt,UrgentLoanBal,UrgentInstallment,UrgentInt,EducationLoanBal,EducationInstallment,EducationInt,GuarantorInstallment,GuarantorInt,OtherLoanBal,OtherInstallment,OtherInt,BankLoanBal,BankInstallment,BankInt,TotalInstallment,OtherLoanCaption from transDemand where IssueDate=@IssueDate order by AccNumber Desc&#34;, con); cmd.Parameters.AddWithValue(&#34;@IssueDate&#34;, datesearch.Value.ToString(&#34;dd-MM-yyyy&#34;)); da = new OleDbDataAdapter(cmd); ds = new DataSet(); OleDbCommandBuilder cmdbuild = new OleDbCommandBuilder(da); da.Fill(ds, &#34;transDemand&#34;); bsource.DataSource = ds.Tables[&#34;transDemand&#34;]; dataGridView1.DataSource = bsource; private void btnupdate_Click(object sender, EventArgs e) { DataTable dt = ds.Tables[&#34;transDemand&#34;]; this.dataGridView1.BindingContext[dt].EndCurrentEdit(); this.da.Update(dt); BindData(); }</pre>https://www.aspforums.net:443/Threads/144309/Windows-Application-Error-OleDbCommandPrepare-method-requires-all-parameters-to-have-an-explicitly-set-type/https://www.aspforums.net:443/Threads/144309/Windows-Application-Error-OleDbCommandPrepare-method-requires-all-parameters-to-have-an-explicitly-set-type/Sun, 08 Jul 2018 23:48:31 GMTWindows Application Error: Could not load file or assembly Microsoft.Office.Interop.Excel Version12.0.0.0 or one of its dependencies<p>i am getting the foll.error while saving the multiple entries :</p> <p>See the end of this message for details on invoking <br />just-in-time (JIT) debugging instead of this dialog box.<br /><br />************* Exception Text *************<br />System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.<br />File name: 'Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'<br />&nbsp;&nbsp; at ExpoDataSystem.ManualEntryForm.saveTemp_Click(Object sender, EventArgs e)<br />&nbsp;&nbsp; at System.Windows.Forms.Control.OnClick(EventArgs e)<br />&nbsp;&nbsp; at System.Windows.Forms.Button.OnClick(EventArgs e)<br />&nbsp;&nbsp; at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)<br />&nbsp;&nbsp; at System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks)<br />&nbsp;&nbsp; at System.Windows.Forms.Control.WndProc(Message&amp; m)<br />&nbsp;&nbsp; at System.Windows.Forms.ButtonBase.WndProc(Message&amp; m)<br />&nbsp;&nbsp; at System.Windows.Forms.Button.WndProc(Message&amp; m)<br />&nbsp;&nbsp; at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)<br />&nbsp;&nbsp; at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)<br />&nbsp;&nbsp; at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)<br /><br />WRN: Assembly binding logging is turned OFF.<br />To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.<br />Note: There is some performance penalty associated with assembly bind failure logging.<br />To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].<br /><br /><br /><br />************* Loaded Assemblies *************<br />mscorlib<br />&nbsp;&nbsp;&nbsp; Assembly Version: 4.0.0.0<br />&nbsp;&nbsp;&nbsp; Win32 Version: 4.6.1586.0 built by: NETFXREL2<br />&nbsp;&nbsp;&nbsp; CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll<br />----------------------------------------<br />ExpoDataSystem<br />&nbsp;&nbsp;&nbsp; Assembly Version: 1.0.0.0<br />&nbsp;&nbsp;&nbsp; Win32 Version: 1.0.0.0<br />&nbsp;&nbsp;&nbsp; CodeBase: file:///C:/Users/COMP/Desktop/test/ExpoDataSystem.exe<br />----------------------------------------<br />System.Windows.Forms<br />&nbsp;&nbsp;&nbsp; Assembly Version: 4.0.0.0<br />&nbsp;&nbsp;&nbsp; Win32 Version: 4.6.1586.0 built by: NETFXREL2<br />&nbsp;&nbsp;&nbsp; CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll<br />----------------------------------------<br />System<br />&nbsp;&nbsp;&nbsp; Assembly Version: 4.0.0.0<br />&nbsp;&nbsp;&nbsp; Win32 Version: 4.6.1586.0 built by: NETFXREL2<br />&nbsp;&nbsp;&nbsp; CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll<br />----------------------------------------<br />System.Drawing<br />&nbsp;&nbsp;&nbsp; Assembly Version: 4.0.0.0<br />&nbsp;&nbsp;&nbsp; Win32 Version: 4.6.1586.0 built by: NETFXREL2<br />&nbsp;&nbsp;&nbsp; CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll<br />----------------------------------------<br />Accessibility<br />&nbsp;&nbsp;&nbsp; Assembly Version: 4.0.0.0<br />&nbsp;&nbsp;&nbsp; Win32 Version: 4.6.1586.0 built by: NETFXREL2<br />&nbsp;&nbsp;&nbsp; CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll<br />----------------------------------------<br />System.Data<br />&nbsp;&nbsp;&nbsp; Assembly Version: 4.0.0.0<br />&nbsp;&nbsp;&nbsp; Win32 Version: 4.6.1586.0 built by: NETFXREL2<br />&nbsp;&nbsp;&nbsp; CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll<br />----------------------------------------<br />System.Xml<br />&nbsp;&nbsp;&nbsp; Assembly Version: 4.0.0.0<br />&nbsp;&nbsp;&nbsp; Win32 Version: 4.6.1586.0 built by: NETFXREL2<br />&nbsp;&nbsp;&nbsp; CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll<br />----------------------------------------<br />System.Configuration<br />&nbsp;&nbsp;&nbsp; Assembly Version: 4.0.0.0<br />&nbsp;&nbsp;&nbsp; Win32 Version: 4.6.1586.0 built by: NETFXREL2<br />&nbsp;&nbsp;&nbsp; CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll<br />----------------------------------------<br />System.Core<br />&nbsp;&nbsp;&nbsp; Assembly Version: 4.0.0.0<br />&nbsp;&nbsp;&nbsp; Win32 Version: 4.6.1586.0 built by: NETFXREL2<br />&nbsp;&nbsp;&nbsp; CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll<br />----------------------------------------<br />System.Transactions<br />&nbsp;&nbsp;&nbsp; Assembly Version: 4.0.0.0<br />&nbsp;&nbsp;&nbsp; Win32 Version: 4.6.1586.0 built by: NETFXREL2<br />&nbsp;&nbsp;&nbsp; CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll<br />----------------------------------------<br />System.EnterpriseServices<br />&nbsp;&nbsp;&nbsp; Assembly Version: 4.0.0.0<br />&nbsp;&nbsp;&nbsp; Win32 Version: 4.6.1586.0 built by: NETFXREL2<br />&nbsp;&nbsp;&nbsp; CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll<br />----------------------------------------<br />System.Runtime.Caching<br />&nbsp;&nbsp;&nbsp; Assembly Version: 4.0.0.0<br />&nbsp;&nbsp;&nbsp; Win32 Version: 4.6.1586.0<br />&nbsp;&nbsp;&nbsp; CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Caching/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Runtime.Caching.dll<br />----------------------------------------<br />System.Numerics<br />&nbsp;&nbsp;&nbsp; Assembly Version: 4.0.0.0<br />&nbsp;&nbsp;&nbsp; Win32 Version: 4.6.1586.0 built by: NETFXREL2<br />&nbsp;&nbsp;&nbsp; CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll<br />----------------------------------------<br /><br />************* JIT Debugging *************<br />To enable just-in-time (JIT) debugging, the .config file for this<br />application or computer (machine.config) must have the<br />jitDebugging value set in the system.windows.forms section.<br />The application must also be compiled with debugging<br />enabled.<br /><br />For example:<br /><br />&lt;configuration&gt;<br />&nbsp;&nbsp;&nbsp; &lt;system.windows.forms jitDebugging="true" /&gt;<br />&lt;/configuration&gt;<br /><br />When JIT debugging is enabled, any unhandled exception<br />will be sent to the JIT debugger registered on the computer<br />rather than be handled by this dialog box.</p>https://www.aspforums.net:443/Threads/132626/Windows-Application-Error-Could-not-load-file-or-assembly-MicrosoftOfficeInteropExcel-Version12000-or-one-of-its-dependencies/https://www.aspforums.net:443/Threads/132626/Windows-Application-Error-Could-not-load-file-or-assembly-MicrosoftOfficeInteropExcel-Version12000-or-one-of-its-dependencies/Mon, 27 Aug 2018 05:33:55 GMTWindows Application AutoMapper Error: Unmapped members were found. Review the types and members below<p>I have set automapper to ignore some property but get error from it of unmapped member.</p> <p>Unmapped members were found. Review the types and members below. Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type</p> <p>Automapper created this type map for you but your types cannote be</p> <p>mapped using current configuration.</p> <p>Articoli -&gt; Product(Destination member list)</p> <p>Unmapped properties:</p> <p>ProductVariant</p> <p>Source: Automapper</p> <pre class="brush: csharp"> public class Product { public Product() { this.ProductVariant = new HashSet&lt;ProductVariant&gt;(); } public string Code{ get; set; } public string Description { get; set; } public virtual ICollection&lt;ProductVariant&gt; ProductVariant { get; set; } } public class ProductVariant { public string Code{ get; set; } public string Variant { get; set; } public virtual Product Product { get; set; } } </pre> <p>&nbsp;</p> <pre class="brush: csharp">static class Program { /// &lt;summary&gt; /// Punto di ingresso principale dell&#39;applicazione. /// &lt;/summary&gt; [STAThread] static void Main() { Mapper.Initialize(c =&gt; c.AddProfile&lt;MappinProfile&gt;()); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); }</pre> <p>&nbsp;In the mapping profile I do</p> <pre class="brush: csharp">public MappinProfile() { var config = new MapperConfiguration(cfg =&gt; { cfg.CreateMap&lt;Articoli, Product&gt;() .ForMember(n=&gt; n.ProductVariant, opt=&gt; opt.Ignore()); //nav property cfg.CreateMap&lt;DescrizioniVariantiArt, ProductVariant&gt;() .ForMember(n=&gt; n.Product, opt=&gt;opt.Ignore()); //nav property }); IMapper mapper = config.CreateMapper(); }</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/356230/Windows-Application-AutoMapper-Error-Unmapped-members-were-found-Review-the-types-and-members-below/https://www.aspforums.net:443/Threads/356230/Windows-Application-AutoMapper-Error-Unmapped-members-were-found-Review-the-types-and-members-below/Fri, 23 Nov 2018 04:50:02 GMTWhich control is similar to Frames control in Windows in ASP.Net<p>in visual basic i use frames...in asp.net what is replacement of frames or how we can use working of frames in asp.net.</p> <p>in frames we give the caption and group together control.</p>https://www.aspforums.net:443/Threads/653942/Which-control-is-similar-to-Frames-control-in-Windows-in-ASPNet/https://www.aspforums.net:443/Threads/653942/Which-control-is-similar-to-Frames-control-in-Windows-in-ASPNet/Thu, 05 Dec 2013 03:13:19 GMTWhere is the location of aspnetregiis exe tool<p>What is the basic functionalty of aspnet_regiis command &amp; where it is in the system?</p>https://www.aspforums.net:443/Threads/149069/Where-is-the-location-of-aspnetregiis-exe-tool/https://www.aspforums.net:443/Threads/149069/Where-is-the-location-of-aspnetregiis-exe-tool/Thu, 19 Sep 2013 02:39:33 GMTWebClient Error: The underlying connection was closed in Windows Application<p>I am trying to send sms using nexmo API in windows forms application</p> <p>when I tried send it&nbsp;says "The underlying connection was closed: An unexpected error occurred on a send."</p> <p>Here is my API info</p> <pre class="volta_fix_copy_button code-toolbar language-bash" data-v-141c14f7="">curl -X <span class="token string">"POST"</span> <span class="token string">"https://rest.nexmo.com/sms/json"</span> \ -d <span class="token string">"from=Nexmo"</span> \ -d <span class="token string">"text=Hello from Nexmo"</span> \ -d <span class="token string">"to=********"</span> \ -d <span class="token string">"api_key=18c03652"</span> \ -d <span class="token string">"api_secret=****************"</span></pre> <pre class="brush: vb"> Dim SmsStatusMsg As String = String.Empty Try Dim client As WebClient = New WebClient() Dim url As String = &#34;https://rest.nexmo.com/sms/xml?api_key=18c03652&amp;api_secret=7Y3hqMnTF4EuE2HE&amp;from=UCPH&amp;to=9607908122&amp;text=D%c3%a9j%c3%a0+vu&#34; SmsStatusMsg = client.DownloadString(url) &#39;MessageBox.Show(&#34;Status: &#34; &amp; client.SelectSingleNode(&#34;/response/status/status_msg&#34;).InnerText) Catch ex As Exception MessageBox.Show(ex.Message, ex.StackTrace) End Try</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/209213/WebClient-Error-The-underlying-connection-was-closed-in-Windows-Application/https://www.aspforums.net:443/Threads/209213/WebClient-Error-The-underlying-connection-was-closed-in-Windows-Application/Sat, 27 Oct 2018 01:47:45 GMTWant to Learn C# language<p>hi i m new to asp can u suggest&nbsp; me to start learning C# from basic</p> <p>can you help to learn</p>https://www.aspforums.net:443/Threads/187985/Want-to-Learn-C-language/https://www.aspforums.net:443/Threads/187985/Want-to-Learn-C-language/Mon, 11 Jun 2012 08:46:11 GMTvb.net reporting doesnt add up the decimal point<p>I am using the vb.net reporting provided by mircosoft.</p> <p>The Database Access has stored a decimal value. 31.23.</p> <p>in the reporting, it doesn't show 31.00 instead it display 31.23</p> <p>I use the FormatNumber(Fields!Cubic.Value,2). it display 31.00 not 31.23.</p> <p>What is the problem with it ? Is it Mircosoft bug.</p> <p>&nbsp;</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/164282/vbnet-reporting-doesnt-add-up-the-decimal-point/https://www.aspforums.net:443/Threads/164282/vbnet-reporting-doesnt-add-up-the-decimal-point/Fri, 22 Jun 2012 00:02:08 GMTValidate Time in DataGridView cell in Windows Application<p>Hi..</p> <p>I want to validate datagridviewcell&nbsp;which contains data in hh:mm:ss in 12 hours as well as in 24 hour format ,how i can validate this..</p> <div class="answer-body"> <p>my date is in followinf format: </p> <p>inTime&nbsp; &nbsp; &nbsp; &nbsp;outTime</p> <p>12:36:60&nbsp; &nbsp; 11:22:15</p> <p>1:25:26&nbsp; &nbsp; &nbsp; 15:02:03 </p> <p>Sir,Now what I want is if user enter only hours,or only minutes or only second,it should validate,morevever user cannot type 89 in case of minutes or hours,user should put colon,not semicolon in time format.</p> <p>Hope you are getting me</p> </div>https://www.aspforums.net:443/Threads/577275/Validate-Time-in-DataGridView-cell-in-Windows-Application/https://www.aspforums.net:443/Threads/577275/Validate-Time-in-DataGridView-cell-in-Windows-Application/Tue, 17 Jul 2018 03:15:10 GMTValidate PinCode ZipCode Postal Code in Windows Application<p>Hi All,</p> <p>&nbsp;</p> <p>How to validate pincode in windows application with c# coding? Pincode will not accept below 6 digits and above 6 digits.</p> <p>&nbsp;</p> <p>Thanks and Regards,</p> <p>Murali.K</p>https://www.aspforums.net:443/Threads/191374/Validate-PinCode-ZipCode-Postal-Code-in-Windows-Application/https://www.aspforums.net:443/Threads/191374/Validate-PinCode-ZipCode-Postal-Code-in-Windows-Application/Fri, 28 Dec 2012 04:46:21 GMTValidate Mobile and Aadhar number using Regular Expression in Windows Application<p>I want to do validation for Mobile Number and aadhar number (12 or 16 digit) in windows form.</p> <p>How to do it please give me refernce links</p> <p>Thanks</p>https://www.aspforums.net:443/Threads/203111/Validate-Mobile-and-Aadhar-number-using-Regular-Expression-in-Windows-Application/https://www.aspforums.net:443/Threads/203111/Validate-Mobile-and-Aadhar-number-using-Regular-Expression-in-Windows-Application/Tue, 03 Jul 2018 01:31:21 GMT