ASPForums.Net RSS Feed additions to the content that appears on ASPForums.Net(c) 2017 All rights reserved.XSRFCSRF Prevention in ASP.NET web application<p>Can any one provide me working demo of&nbsp;XSRF/CSRF&nbsp;in ASP.NET web application</p>, 14 Mar 2017 09:22:34 GMTWill Asynchronous email will be sent even after Web Page is closed in ASP.Net?<p>Hi,</p> <p>I'd like a suggestion, I read this good Article:</p> <p><a href=""></a></p> <p>My Req. is after some event (ie click button) start send email process, but I'd like that user can close also the webpage without waiting the response of sending email.</p> <p>How can I do this, working with webservice or ?</p> <p>Tks&nbsp;</p> <p>Br\Vincenzo</p>, 20 Oct 2015 05:13:21 GMTWhat FaultContract in WCF?<p>Hi</p> <p>I am having small clarification in Message and Fault Contract.</p> <p>fault contract is mainly used to handle the exception that happened in service to the consumer of the service. In other words it is used to customize the message in the service and send it to the consumer.</p> <p>My doubt is that why should i go for FaultContract. I can use MessageContract or Even i can put some datamember in the datacontract to store the exception and send it to the application.</p> <p>Hope this is clear. Please let me know if this is not.</p>, 06 Aug 2014 00:52:09 GMTWhat Asynchronous call in WCF<p>Hi</p> <p>can any one explain me async call in wcf. What is the advantage and how it is used in WCF</p>, 12 Aug 2014 04:23:50 GMTWeb Service vs ASP.NET Web API and implementing Web API<p>Hi,&nbsp;</p> <p>I am new to web service and Web API.</p> <p>Need to know practicle things which we can do with WEB API and not with web service, which can demonstrate, why we should prefer WEB API over WEB Serveice.</p> <p>&nbsp;</p> <p>Need example except web service using SOAP,XML etc, if any.</p>, 30 Sep 2016 02:11:08 GMTweb project C# run correctly on my system but it runs another system that time design change<p>web project in c# working properly on my system(Computer), but this project run on another syatem that time web page design will be change.</p> <p>web page design in the with &nbsp;css.</p> <p>what can i do for solve this issue ?</p>, 20 May 2016 01:43:08 GMTWCF Error Failed to update Service Reference 'WCFService.Reference' There was an error downloading<p>Error1Failed to update Service Reference 'SecurityWCFService.Reference'.Error:There was an error downloading 'http://localhost/SecServiceSite/Service.svc'.The request failed with HTTP status 404: Not Found.Metadata contains a reference that cannot be resolved: 'http://localhost/SecServiceSite/Service.svc'.There was no endpoint listening at http://localhost/SecServiceSite/Service.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.The remote server returned an error: (404) Not Found.(0x80131509)file:///D:/Ram/rajesh/New Folder (2)/Intranet/myAsmara/App_WebReferences/SecurityWCFService/Reference.svcmapD:\...\myAsmara\</p>, 13 Oct 2014 01:10:18 GMTWarning: This web reference does not conform to WS-I Basic Profile v1.1. SOAP 1.1 binding was not found:<p>Hi,</p> <p>&nbsp;</p> <p>I want to create a Proxy class file from WSDL which is having Soap12 bindings style. I tried to create that using Wsdl.exe from command prompt. But i received the following error</p> <p>&nbsp;</p> <p><strong>Warning: This web reference does not conform to WS-I Basic Profile v1.1.</strong><br /><strong>SOAP 1.1 binding was not found: WS-I's Basic Profile 1.1 consists of implementat</strong><br /><strong>ion guidelines that recommend how a set of core Web services specifications shou</strong><br /><strong>ld be used together to develop interoperable Web services. For the 1.1 Profile,</strong><br /><strong>those specifications are SOAP 1.1, WSDL 1.1, UDDI 2.0, XML 1.0 and XML Schema.</strong></p> <p><strong>For more details on the WS-I Basic Profile v1.1, see the specification</strong><br /><strong>at</strong></p> <p><strong>Warning: one or more bindings were skipped.</strong><br /><strong>Warnings were encountered. Review generated source comments for more details.</strong></p> <p><strong><br /></strong></p> <p><strong>so i couldn't create the class file. Please help</strong></p> <p>&nbsp;</p>, 26 Feb 2014 09:24:36 GMTUse HttpContext.Current in WCF Service<p>I have created an WCF service for client in However the Response is not getting from POst method. Below is the code snippet:</p> <p>&nbsp;</p> <p>&nbsp;</p> <pre class="brush: csharp">public void Post() { System.Web.HttpContext.Current.Response.Clear(); System.Web.HttpContext.Current.Response.Write(&#34;&lt;html&gt;&lt;head&gt;&#34;); System.Web.HttpContext.Current.Response.Write(string.Format(&#34;&lt;/head&gt;&lt;body onload=\&#34;document.{0}.submit()\&#34;&gt;&#34;, FormName)); System.Web.HttpContext.Current.Response.Write(string.Format(&#34;&lt;form name=\&#34;{0}\&#34; method=\&#34;{1}\&#34; action=\&#34;{2}\&#34; &gt;&#34;, FormName, Method, Url)); for (int i = 0; i &lt; Inputs.Keys.Count; i++) { System.Web.HttpContext.Current.Response.Write(string.Format(&#34;&lt;input name=\&#34;{0}\&#34; type=\&#34;hidden\&#34; value=\&#34;{1}\&#34;&gt;&#34;, Inputs.Keys[i], Inputs[Inputs.Keys[i]])); } System.Web.HttpContext.Current.Response.Write(&#34;&lt;/form&gt;&#34;); System.Web.HttpContext.Current.Response.Write(&#34;&lt;/body&gt;&lt;/html&gt;&#34;); System.Web.HttpContext.Current.Response.End(); } </pre> <p>&nbsp;</p>, 22 Jun 2015 07:23:35 GMTService Oriented Architecture with WCF<p>I want to secure my WCF services from unauthorized access. I am using ASP MVC as a front end to access my WCF services. Can I encrypt my services URL in JS file? And how I maintain the state management. I am calling my services directly through AJAX call and I am avoiding Model and Controller (using only for redirections from menu). What is the best approach to create SOA?<img src="file:///C:/Users/khabib/Desktop/arch.png" alt="Arch" /></p>, 28 Mar 2016 02:11:31 GMTSend email using web application like Contact Us page in ASP.Net<p>how can the user send their requirement via email using my web application in must send mail to the mail account which associated with a Gmail account in my site......</p> <p>Dear i have a site ...on my site, there is three textbox&nbsp;</p> <p>1."From" in this box user need to write his mail id.</p> <p>2."Subject" what he/she is going to send me&nbsp;</p> <p>3. "Message Box"</p> <p>4.And a button called "Send"</p> <p>user type their mail id , subject and message and then user click on the button and the mail will come to my email is which is attached&nbsp;to my site</p> <p>&nbsp;</p>, 20 Jul 2016 03:52:15 GMTPass parameters to Web API in ASP.Net<p>How to sending Parameter or Request to Web API When It is Hosted onLine?</p>, 09 Sep 2014 03:21:55 GMTUpload image using WCF Rest WebService in ASP.Net<p>How to upload and save images as (BLOB) in databse in using WCF</p> <p>&nbsp;</p> <p>am getting images as bytes in my datatable..but returns error 400 if multiple images selected</p> <pre class="brush: csharp"> DocumentID = int.Parse(Request.QueryString[&#34;DocID&#34;]); byte[] fileData = new byte[file.InputStream.Length]; //Stream streamdata = new MemoryStream(fileData); file.InputStream.Read(fileData, 0, Convert.ToInt32(file.InputStream.Length)); file = getfile.UploadedFiles[filecnt]; if (dtImage == null || dtImage.Rows.Count == 0) { dtImage = new DataTable(); dtImage.Columns.Add(&#34;REQID&#34;); dtImage.Columns.Add(&#34;DocType&#34;); dtImage.Columns.Add(&#34;FileType&#34;); dtImage.Columns.Add(&#34;uploadId&#34;); //dtImage.Columns.Add(&#34;DATA&#34;, typeof(Byte[])); //dtImage.Columns.Add(&#34;DATAstream&#34;, typeof(Stream)); for (int i = 0; i &lt;= 0; i++) { DataRow dtrowtar = dtImage.NewRow(); dtrowtar[0] = DocumentID; dtrowtar[1] = ddlType.SelectedValue.ToString(); dtrowtar[2] = file.GetExtension().ToString(); dtrowtar[3] = 1; dtrowtar[4] = fileData; //dtrowtar[5] = streamdata; dtImage.Rows.Add(dtrowtar); } } else { int DocIndex = dtImage.Rows.Count; dtImage.Rows.Add(); dtImage.Rows[DocIndex][&#34;REQID&#34;] = dtImage.Rows[0][&#34;REQID&#34;]; dtImage.Rows[DocIndex][&#34;DocType&#34;] = ddlType.SelectedValue.ToString(); dtImage.Rows[DocIndex][&#34;FileType&#34;] = file.GetExtension().ToString(); dtImage.Rows[DocIndex][&#34;uploadId&#34;] = int.Parse(dtImage.Rows[DocIndex - 1][&#34;uploadId&#34;].ToString()) + 1; dtImage.Rows[DocIndex][&#34;Data&#34;] = fileData; //dtImage.Rows[DocIndex][&#34;DATAstream&#34;] = streamdata; } } </pre> <p>&nbsp;</p>, 03 Dec 2013 00:36:17 GMTUpload Image file using Web Service in ASP.Net<p>Hello,</p> <p>I want web service which will upload images (.jpeg, .jpg, .png) on server and this web service will call by android app, I am using web service <strong>not</strong> WCF.</p>, 01 Sep 2015 04:36:17 GMTUpload file using Web Service in ASP.Net<p>Hello,</p> <p>I have one web method and I want to upload file on server using this method please guide me how to implement it.</p>, 24 Aug 2015 04:46:21 GMTInsert data into Database using WCF Service in ASP.Net<p>please guide me</p> <p>How to insert data in DB by Web Service/WCF service</p> <p>&nbsp;</p> <p>Thanks</p>, 28 May 2015 02:11:34 GMTImplement N tier architecture using web service in ASP.Net<p>Please share me demo site using N Tier with Webservice.</p> <p>Thanks</p>, 20 Dec 2013 10:25:56 GMTHTTP Error 404.0 - Not Found when accesing WCF SVC service<p>I wanna host a wcf service that only GET data</p> <p>It works fine on my Localhost but when i host on url it gives error</p> <p>&nbsp;</p> <pre class="brush: html">Detailed Error Information: Module IIS Web Core Notification MapRequestHandler Handler StaticFile Error Code 0x80070002 Requested URL Physical Path G:\PleskVhosts\\httpdocs\Service1.svc\singleword\hi Logon Method Anonymous Logon User Anonymous</pre> <p>I dont know whats the issue</p> <p>&nbsp;My config</p> <pre class="brush: xml">&lt;?xml version=&#34;1.0&#34;?&gt; &lt;configuration&gt; &lt;appSettings&gt;&lt;/appSettings&gt; &lt;connectionStrings&gt; &lt;!--&lt;add name=&#34;NewTestConnectionString&#34; connectionString=&#34;Data Source=RHC-PC;Initial Catalog=NewTest;Integrated Security=True&#34; providerName=&#34;System.Data.SqlClient&#34; /&gt;--&gt; &lt;/connectionStrings&gt; &lt;system.web&gt; &lt;customErrors mode=&#34;Off&#34;&gt; &lt;/customErrors&gt; &lt;/system.web&gt; &lt;system.webServer&gt; &lt;httpErrors errorMode=&#34;Detailed&#34;&gt;&lt;/httpErrors&gt; &lt;validation validateIntegratedModeConfiguration=&#34;false&#34;/&gt; &lt;/system.webServer&gt; &lt;system.serviceModel&gt; &lt;serviceHostingEnvironment multipleSiteBindingsEnabled=&#34;true&#34;&gt; &lt;baseAddressPrefixFilters&gt; &lt;add prefix=&#34;htttp://;/&gt; &lt;/baseAddressPrefixFilters&gt; &lt;/serviceHostingEnvironment&gt; &lt;services&gt; &lt;service name=&#34;StressApi.Service1&#34; behaviorConfiguration=&#34;StressApi.Service1Behavior&#34;&gt; &lt;endpoint address=&#34;../Service1.svc&#34; binding=&#34;webHttpBinding&#34; contract=&#34;StressApi.IService1&#34; behaviorConfiguration=&#34;webBehaviour&#34;&gt; &lt;/endpoint&gt; &lt;/service&gt; &lt;/services&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name=&#34;StressApi.Service1Behavior&#34;&gt; &lt;serviceDebug includeExceptionDetailInFaults=&#34;false&#34;/&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;endpointBehaviors&gt; &lt;behavior name=&#34;webBehaviour&#34;&gt; &lt;webHttp/&gt; &lt;/behavior&gt; &lt;/endpointBehaviors&gt; &lt;/behaviors&gt; &lt;/system.serviceModel&gt; &lt;/configuration&gt; </pre> <p>&nbsp;</p>, 15 Apr 2015 01:01:41 GMTHow to use WCF Service to upload multiple files in ASP.Net<p>I want to upload multiple files(it may contain images too) to my server using WCF Service in how can I do?</p>, 17 Jul 2014 01:34:30 GMTHow to use SignalR chat in ASP.Net Web Forms Example<p>2 questions</p> <p>i) I am trying to establish a web page with chat facility on web form, since most of the other pages of that site have already been done on Web form and not in MVC.&nbsp;While searching some Jquery based chat examples for web form, none were available and even very few ones available are not working. So, I guess the SignalR feature is only doable from MVC and not from Web forms. Is it so?</p> <p>If not, provide me with some good examples which works well...</p> <p>ii) &nbsp;The hardest part is the Global.asax.cs page....Global.asax is available on Web forms and not Global.asax.cs.</p> <p>&nbsp;</p> <p>How to accomplish this?</p> <p>&nbsp;</p>, 26 Nov 2014 02:52:20 GMT