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.Will 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="http://www.aspsnippets.com/Articles/How-to-send-email-Asynchronously-in-ASPNet-using-Background-Thread.aspx">http://www.aspsnippets.com/Articles/How-to-send-email-Asynchronously-in-ASPNet-using-Background-Thread.aspx</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>https://www.aspforums.net:443/Threads/750155/Will-Asynchronous-email-will-be-sent-even-after-Web-Page-is-closed-in-ASPNet/https://www.aspforums.net:443/Threads/750155/Will-Asynchronous-email-will-be-sent-even-after-Web-Page-is-closed-in-ASPNet/Tue, 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>https://www.aspforums.net:443/Threads/194788/What-FaultContract-in-WCF/https://www.aspforums.net:443/Threads/194788/What-FaultContract-in-WCF/Wed, 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>https://www.aspforums.net:443/Threads/999938/What-Asynchronous-call-in-WCF/https://www.aspforums.net:443/Threads/999938/What-Asynchronous-call-in-WCF/Tue, 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>https://www.aspforums.net:443/Threads/168546/Web-Service-vs-ASPNET-Web-API-and-implementing-Web-API/https://www.aspforums.net:443/Threads/168546/Web-Service-vs-ASPNET-Web-API-and-implementing-Web-API/Fri, 30 Sep 2016 02:11:08 GMTWeb page displaying Empty Pie Chart for dynamic values in ASP.Net<p>i dynamically set the value in pie chart My code as follows</p> <pre class="brush: csharp">&lt;asp:PieChart ID=&#34;PieChart1&#34; runat=&#34;server&#34; ChartHeight=&#34;300&#34; ChartWidth=&#34;450&#34; ChartTitle=&#34;Today&#39;s Attendance&#34; ChartTitleColor=&#34;#0E426C&#34;&gt; &lt;piechartvalues&gt; &lt;asp:PieChartValue Category=&#34;Present&#34; Data=&#34;80&#34; /&gt; &lt;asp:PieChartValue Category=&#34;Absent&#34; Data=&#34;10&#34; /&gt; &lt;asp:PieChartValue Category=&#34;Leave&#34; Data=&#34;10&#34; /&gt; </pre> <p>when i run the above code shows the empty pie chart. what is the mistake in my above code.</p>https://www.aspforums.net:443/Threads/148037/Web-page-displaying-Empty-Pie-Chart-for-dynamic-values-in-ASPNet/https://www.aspforums.net:443/Threads/148037/Web-page-displaying-Empty-Pie-Chart-for-dynamic-values-in-ASPNet/Tue, 16 Jan 2018 00:14:59 GMTRazor Web Pages Folder Security<p>I am able to secure the .vbhtml pages using WebSecurity and _PageStart.vbhtml; however, this does not protect other files in the folder, such as .pdf files, etc.&nbsp; How do I secure other folder items?</p>https://www.aspforums.net:443/Threads/356060/Razor-Web-Pages-Folder-Security/https://www.aspforums.net:443/Threads/356060/Razor-Web-Pages-Folder-Security/Wed, 15 Nov 2017 02:30:58 GMTProgrammatically change WCF Services EndPoint Address in ASP.Net<p>I currently have a wcf web service that is referenced by my hosted application and have configured the web.config file with the end-point. I need to be able to dynamically chand the eddredd for the endpoint upon login. Can someone help me with this?</p>https://www.aspforums.net:443/Threads/108662/Programmatically-change-WCF-Services-EndPoint-Address-in-ASPNet/https://www.aspforums.net:443/Threads/108662/Programmatically-change-WCF-Services-EndPoint-Address-in-ASPNet/Fri, 21 Apr 2017 01:55:25 GMTPost JSON data to WebService using jQuery AJAX in ASP.Net<p>hello,</p> <p>&nbsp;</p> <p>i am using this article webservice logic for CRUD in my web application</p> <p><a href="https://www.aspsnippets.com/Articles/Select-Insert-Edit-Update-Delete-using-Web-Service-in-ASPNet.aspx">https://www.aspsnippets.com/Articles/Select-Insert-Edit-Update-Delete-using-Web-Service-in-ASPNet.aspx</a></p> <p>&nbsp;</p> <p>its working fine.</p> <p>&nbsp;</p> <p>I just want to convert all response insert update delete to json so i can use the same webservice in android.</p>https://www.aspforums.net:443/Threads/186438/Post-JSON-data-to-WebService-using-jQuery-AJAX-in-ASPNet/https://www.aspforums.net:443/Threads/186438/Post-JSON-data-to-WebService-using-jQuery-AJAX-in-ASPNet/Thu, 21 Jun 2018 23:53:36 GMTWeb Service Error: Only one usage of each socket address (protocol/network address/port) is normally permitted<p>Hi i am geeting this error i hosting listner code in amazon webservice</p> <p>this is console application when i publish and run this code i got this error when i hosted this code in amazon server</p> <p>Only one usage of each socket address (protocol/network address/port) is normally permitted</p> <p>this my code help me to solve this issue</p> <pre class="brush: csharp">using MySql.Data.MySqlClient; using System; using System.Collections.Generic; using System.Json; using System.Linq; using System.Net; using System.Net.Sockets; using System.Text; using System.Threading; using System.Threading.Tasks; namespace New_Server_Listener_Code { class Program { private static string URI = &#34;xxx&#34;; private static byte[] _buffer = new byte[1024]; private static List&lt;Socket&gt; _clientSockets= new List&lt;Socket&gt;(); private static Socket _serverSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); static void Main(string[] args) { SetupServer(); Console.ReadLine(); } private static void SetupServer() { Console.WriteLine(&#34;Setting up Server..&#34;); _serverSocket.Bind(new IPEndPoint(IPAddress.Any, 12121)); _serverSocket.Listen(1000); _serverSocket.BeginAccept(new AsyncCallback(AcceptCallback), null); } private static void AcceptCallback(IAsyncResult AR) { Socket socket = _serverSocket.EndAccept(AR); _clientSockets.Add(socket); socket.BeginReceive(_buffer, 0, _buffer.Length, SocketFlags.None, new AsyncCallback(ReceiveCallback), socket); _serverSocket.BeginAccept(new AsyncCallback(AcceptCallback), null); } private static void ReceiveCallback(IAsyncResult AR) { Socket socket = (Socket)AR.AsyncState; int received = socket.EndReceive(AR); byte[] dataBuf = new byte[received]; Array.Copy(_buffer, dataBuf, received); String response = String.Empty; response = Encoding.ASCII.GetString(dataBuf); Console.WriteLine(&#34;Received:&#34; + response); try { using (WebClient wc = new WebClient()) { string Request = &#34;SelectionType=Request&amp;DataValue=&#34; + response + &#34;&#34;; wc.Headers[HttpRequestHeader.ContentType] = &#34;application/x-www-form-urlencoded&#34;; string HtmlResult = wc.UploadString(URI, Request); var json = JsonObject.Parse(HtmlResult); } } catch (WebException ex) { Console.WriteLine(ex); } } } }</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/968517/Web-Service-Error-Only-one-usage-of-each-socket-address-protocolnetwork-addressport-is-normally-permitted/https://www.aspforums.net:443/Threads/968517/Web-Service-Error-Only-one-usage-of-each-socket-address-protocolnetwork-addressport-is-normally-permitted/Wed, 31 Jan 2018 00:50:21 GMTweb project Asp.net C# run correctly on my system but it runs another system that time design change<p>web project in asp.net 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 asp.net with &nbsp;css.</p> <p>what can i do for solve this issue ?</p>https://www.aspforums.net:443/Threads/150616/web-project-Aspnet-C-run-correctly-on-my-system-but-it-runs-another-system-that-time-design-change/https://www.aspforums.net:443/Threads/150616/web-project-Aspnet-C-run-correctly-on-my-system-but-it-runs-another-system-that-time-design-change/Fri, 20 May 2016 01:43:08 GMTPass parameters to Web API in ASP.Net<p>How to sending Parameter or Request to Web API When It is Hosted onLine?</p>https://www.aspforums.net:443/Threads/158237/Pass-parameters-to-Web-API-in-ASPNet/https://www.aspforums.net:443/Threads/158237/Pass-parameters-to-Web-API-in-ASPNet/Tue, 09 Sep 2014 03:21:55 GMTPass data from one server to another server with webservice using C# and VB.Net in ASP.Net<p>Hiii,</p> <p>I am newer to webservice concept in .net.</p> <p>I want to pass data from application1 (Server1) to application2 (Server2) using webservice.</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/142982/Pass-data-from-one-server-to-another-server-with-webservice-using-C-and-VBNet-in-ASPNet/https://www.aspforums.net:443/Threads/142982/Pass-data-from-one-server-to-another-server-with-webservice-using-C-and-VBNet-in-ASPNet/Fri, 08 Sep 2017 05:02:12 GMTWCF Error: Could not find default endpoint element that references contract<p> Client side Code 1. I have created web application and added service reference to the Client Project 2. I tried creating a client Object like this -</p> <p>Service1Client a = new Service1Client();</p> <p>but getting an error message :- Could not find default endpoint element that references contract 'ServiceReference_test.IService1' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.</p> <p> Could you please let me know what mistake am doing, I am new to WCF please help me</p> <pre class="brush: csharp">===============WCF service which returns JSON Format =============== namespace WcfService1 { // NOTE: You can use the &#34;Rename&#34; command on the &#34;Refactor&#34; menu to change the class name &#34;Service1&#34; in code, svc and config file together. // NOTE: In order to launch WCF Test Client for testing this service, please select Service1.svc or Service1.svc.cs at the Solution Explorer and start debugging. public class Service1 : IService1 { public string GetData(string Id) { return (&#34;You entered: &#34; + Id); } } } ==================== namespace WcfService1 { [ServiceContract] public interface IService1 { [OperationContract] [WebInvoke(Method = &#34;GET&#34;, UriTemplate = &#34;/GetData/{Id}&#34;, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped )] string GetData(string Id); // TODO: Add your service operations here } } ====================Web.Config file ========= &lt;system.serviceModel&gt; &lt;services&gt; &lt;service name=&#34;WcfService1.Service1&#34; behaviorConfiguration=&#34;ServiceBehaviour&#34;&gt; &lt;endpoint address=&#34;&#34; behaviorConfiguration=&#34;web&#34; binding=&#34;webHttpBinding&#34; contract=&#34;WcfService1.IService1&#34;/&gt; &lt;endpoint contract=&#34;IMetadataExchange&#34; binding=&#34;mexHttpBinding&#34; address=&#34;mex&#34;/&gt; &lt;/service&gt; &lt;/services&gt; &lt;behaviors&gt; &lt;endpointBehaviors&gt; &lt;behavior name=&#34;web&#34;&gt; &lt;webHttp helpEnabled=&#34;true&#34; automaticFormatSelectionEnabled=&#34;false&#34; /&gt; &lt;/behavior&gt; &lt;/endpointBehaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name=&#34;ServiceBehaviour&#34;&gt; &lt;serviceMetadata httpGetEnabled=&#34;true&#34; httpsGetEnabled=&#34;true&#34;/&gt; &lt;serviceDebug includeExceptionDetailInFaults=&#34;false&#34;/&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;!--&lt;protocolMapping&gt; &lt;add binding=&#34;basicHttpsBinding&#34; scheme=&#34;https&#34; /&gt; &lt;/protocolMapping&gt;--&gt; &lt;serviceHostingEnvironment aspNetCompatibilityEnabled=&#34;true&#34; multipleSiteBindingsEnabled=&#34;true&#34; /&gt; &lt;/system.serviceModel&gt; </pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/123116/WCF-Error-Could-not-find-default-endpoint-element-that-references-contract/https://www.aspforums.net:443/Threads/123116/WCF-Error-Could-not-find-default-endpoint-element-that-references-contract/Tue, 20 Feb 2018 23:02:11 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>https://www.aspforums.net:443/Threads/212904/WCF-Error-Failed-to-update-Service-Reference-WCFServiceReference-There-was-an-error-downloading/https://www.aspforums.net:443/Threads/212904/WCF-Error-Failed-to-update-Service-Reference-WCFServiceReference-There-was-an-error-downloading/Mon, 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 http://www.ws-i.org/Profiles/BasicProfile-1.1.html.</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>https://www.aspforums.net:443/Threads/201910/Warning-This-web-reference-does-not-conform-to-WS-I-Basic-Profile-v11-SOAP-11-binding-was-not-found/https://www.aspforums.net:443/Threads/201910/Warning-This-web-reference-does-not-conform-to-WS-I-Basic-Profile-v11-SOAP-11-binding-was-not-found/Wed, 26 Feb 2014 09:24:36 GMTUse HttpContext.Current in WCF Service<p>I have created an WCF service for client in ASp.net. 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>https://www.aspforums.net:443/Threads/197128/Use-HttpContextCurrent-in-WCF-Service/https://www.aspforums.net:443/Threads/197128/Use-HttpContextCurrent-in-WCF-Service/Mon, 22 Jun 2015 07:23:35 GMTUrl Rewrite Rule not working with multiple parameters in ASP.Net<p>Dear Sir I Have More than one url With Querystrings And I Want to Url Rewrite For Such A Standared Format Application.&nbsp;</p> <p>So I Make Many Rules For Such Url Rewriting Dynamic. </p> <p>localhost/profile.aspx?inst_id=3052&amp;course_id=&amp;course=true</p> <p>Courses/3052/Info/True</p> <p>its Working Good.</p> <pre class="brush: csharp">&lt;rule name=&#34;rule3&#34; stopProcessing=&#34;true&#34;&gt; &lt;match url=&#34;Courses/([0-9]+)/([_0-9a-z-]+)/([_0-9a-z-]+)&#34; /&gt; &lt;action type=&#34;Rewrite&#34; url=&#34;profile.aspx?inst_id={R:1}&amp;amp;course_id={R:2}&amp;amp;course={R:3}&#34; /&gt; &lt;/rule&gt;</pre> <p>But Second Url :</p> <p>localhost/profile.aspx?inst_id=3052&amp;course_id=&amp;photos=true</p> <p>Photo/3052/Images/True</p> <p>this is not working&nbsp;</p> <pre class="brush: csharp">&lt;rule name=&#34;rule4&#34; stopProcessing=&#34;true&#34;&gt; &lt;match url=&#34;Photo/([0-9]+)/([_0-9a-z-]+)/([_0-9a-z-]+)&#34; /&gt; &lt;action type=&#34;Rewrite&#34; url=&#34;profile.aspx?inst_id={R:1}&amp;amp;admission={R:2}&amp;amp;admission={R:3}&#34; /&gt; &lt;/rule&gt;</pre> <p>please tell me how to do for both</p> <p>thanks in advanced</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/729383/Url-Rewrite-Rule-not-working-with-multiple-parameters-in-ASPNet/https://www.aspforums.net:443/Threads/729383/Url-Rewrite-Rule-not-working-with-multiple-parameters-in-ASPNet/Wed, 24 Jan 2018 05:10:04 GMTUpdate WCF Data Service Reference in ASP.Net<p>I created a web service with 2 operation contracts. Added service references in web application and consumed those methods in web.</p> <p>now i add 3rd method in wcf service.</p> <p>is it required to delete service reference and add again to consume 3rd method in web?</p> <p>Thanks in advance.</p>https://www.aspforums.net:443/Threads/171908/Update-WCF-Data-Service-Reference-in-ASPNet/https://www.aspforums.net:443/Threads/171908/Update-WCF-Data-Service-Reference-in-ASPNet/Tue, 09 Jan 2018 22:43:29 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>https://www.aspforums.net:443/Threads/785316/Service-Oriented-Architecture-with-WCF/https://www.aspforums.net:443/Threads/785316/Service-Oriented-Architecture-with-WCF/Mon, 28 Mar 2016 02:11:31 GMTSend http web request without waiting for response in ASP.Net<p><br />How to send http request in asp.net without waiting for a response and without tying up resources and other page events should work properly ?</p>https://www.aspforums.net:443/Threads/211621/Send-http-web-request-without-waiting-for-response-in-ASPNet/https://www.aspforums.net:443/Threads/211621/Send-http-web-request-without-waiting-for-response-in-ASPNet/Mon, 06 Nov 2017 00:24:38 GMT