Jump to content

Girish Dubey

Members
  • Content count

    21
  • Joined

  • Last visited

Everything posted by Girish Dubey

  1. I am going to create a application in this application i want to use authorization server and resource server and client application in different application for hosting in different location. How i can design my application. Firstly, Can i host authorization server and resource server and client application in different location.
  2. I am trying to consume service using proxy class. i am getting below exception. "The underlying connection was closed: An unexpected error occurred on a receive." ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; //proxy class initialization ISessionManager objISessionManager = new SessionManagerClient("https://abcxyz.com/sessionmanager.svc"); LogonRequest objLogonRequest = new LogonRequest(); objLogonRequest.logonRequestData = new LogonRequestData(); objLogonRequest.ContractVersion = APICredential.ContractVersion; objLogonRequest.logonRequestData.DomainCode = APICredential.AgentDomain; objLogonRequest.logonRequestData.AgentName = APICredential.AgentID; objLogonRequest.logonRequestData.Password = APICredential.Password; LogonResponse objLogonResponse = objISessionManager.Logon(objLogonRequest); can you suggest how we can fix it.
  3. How to remove attributes?

    Yes! you can remove one or more than one attributes in single a statement by using below statement. $("img").removeAttr( "title" ).removeAttr( "someotherattr" );
  4. I am trying to bind dynamic event but i am not able to bind. previously i have used .live in our system that was working find now we are going to migrate our system to jquery 3.1.1. and i have replace all .live to .on function but work. for you reference.. <html> <head> <script src="jquery-3.1.1.min.js"></script> <!-- <script src="jquery-1.8.1.min.js"></script> --> <script> var abcHandler = function() { var h=this; h.getControl = function(cntrl) { return $("[class$='Cntrl_" + cntrl + "']"); }; h.main = h.getControl('main'); h.divid1 = h.getControl('divid1'); h.divid2 = h.getControl('divid2'); } abcHandler.prototype.BindEvents = function() { var h=this; h.main.append("<a class='Cntrl_divid1' href='#'>View Details1</a><br />"); h.main.append("<a class='Cntrl_divid2' href='#'>View Details2</a>"); h.divid1.click(function () { alert(this.innerHTML); }); h.divid2.click(function () { alert(this.innerHTML); }); }; var handler; $(document).ready(function() { handler = new abcHandler(); handler.BindEvents(); }); </script> </head> <body> <div class="Cntrl_main"> </div> </body> </html> Please suggest me how i can fix this issue. das
  5. I am going to develop optimize web site. The problem with 200-250 AJAX calls for different values on loading. that's why i have selected angularjs-http-batch request to get values. So, Can you suggest me pros and cons of batch request?
  6. asynchronous Call a WebService in .net 4.0

    I am trying to call a web service asynchronous in .net 4.0. I mean i don't want any kind of response from service side. I just want to execute a web method. can you suggest me how i can call? Service Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; namespace UILAYER.Service { /// <summary> /// Summary description for TestService /// </summary> [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. //[System.Web.Script.Services.ScriptService] public class TestService : System.Web.Services.WebService { int Message = "success||Record has been updated."; [WebMethod] public object ExecuteProcessRawRunches() { try { if (Message.ToLower().StartsWith("success||")) { return new { Result = "OK", Records = Message }; } else { return new { Result = "ERROR", Records = Message }; } } catch (Exception ex) { return new { Result = "ERROR", Message = ex.Message }; } } } }
  7. how to maintain scope transaction in sql

    Can you suggest me. How can i maintain Transaction in sql for a scope? @@TRANCOUNT is used for a connection.
  8. Problem in Export to excel from asp.net

    I found some problem with below code when i am trying to export to excel using below code on IE and Mozilla Firefox. But sometime it works fine but sometime it works fine. So can you suggest me how i can resolve the problem? public static void ToExcel(GridView _grid, string FileName) { try { _grid.AllowPaging = false; PrepareGridViewForExport(_grid); string attachment = "attachment; filename=" + FileName + ""; HttpContext.Current.Response.Clear(); HttpContext.Current.Response.Buffer = true; HttpContext.Current.Response.BufferOutput = true; HttpContext.Current.Response.ClearContent(); HttpContext.Current.Response.AddHeader("content-disposition", attachment); //HttpContext.Current.Response.ContentType = "application/ms-excel";//Excel 2003 //application/vnd.ms-excel HttpContext.Current.Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";//Excel 2007 StringWriter sw = new StringWriter(); HtmlTextWriter htw = new HtmlTextWriter(sw); // Create a form to contain the grid htw.WriteLine(Heading); if (!string.IsNullOrEmpty(Company)) { if (!Company.Contains("Select")) htw.WriteLine("<br/><b>Company : </b>" + Company); } if (!string.IsNullOrEmpty(Department)) { if (!Department.Contains("Select")) htw.WriteLine("<br/><b>Department : </b>" + Department); } if (!string.IsNullOrEmpty(Region)) { if (!Region.Contains("Select")) htw.WriteLine("<br/><b>Region : </b>" + Region); } htw.WriteLine("<br/><b>" + Heading + "</b> From <b>" + FromDate + "</b> To <b>" + ToDate + "</b> "); htw.WriteLine("<br/><br/>"); HtmlForm frm = new HtmlForm(); _grid.Parent.Controls.Add(frm); frm.Attributes["runat"] = "server"; frm.Controls.Add(_grid); frm.RenderControl(htw); HttpContext.Current.Response.Write("<meta http-equiv=Content-Type content=text/html; charset=utf-8>" + Environment.NewLine); HttpContext.Current.Response.Write("HRMS Reports Sheet" + Environment.NewLine); HttpContext.Current.Response.Write(AddExcelStyling()); HttpContext.Current.Response.Write(sw.ToString()); HttpContext.Current.Response.Write("</body>"); HttpContext.Current.Response.Write("</html>"); HttpContext.Current.Response.Flush(); HttpContext.Current.Response.End(); } catch (Exception ex) { string str = ex.Message; } }
  9. Problem in Export to excel from asp.net

    I compared and found both file's content were same but file extension were not same. When i downloaded from google chrome file extension was ".xls" but when i was downloaded from Mozilla file extension was ".xlsx". I param i passed a grid and file name with "Report Data.xls". From google chrome file name come with "Report Data.xls" but when Download from Mozilla file name come with "Report Data.xls.xlsx".
  10. Problem in Export to excel from asp.net

    when i am trying to export data in Mozilla Firefox i get a file but when i trying to open that excel file not open and display file format or extension is not correct.
  11. Which browser support cookies or not

    I have seen many times my browser doesn't support cookie. Can you suggest how many browsers are not supported.
  12. C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>InstallUtil /i D:\HrmsAlertSvc\Hrm sAlertSvc.exe Microsoft ® .NET Framework Installation utility Version 4.0.30319.1 Copyright © Microsoft Corporation. All rights reserved. Running a transacted installation. Beginning the Install phase of the installation. See the contents of the log file for the D:\HrmsAlertSvc\HrmsAlertSvc.exe assemb ly's progress. The file is located at D:\HrmsAlertSvc\HrmsAlertSvc.InstallLog. Installing assembly 'D:\HrmsAlertSvc\HrmsAlertSvc.exe'. Affected parameters are: logtoconsole = i = logfile = D:\HrmsAlertSvc\HrmsAlertSvc.InstallLog assemblypath = D:\HrmsAlertSvc\HrmsAlertSvc.exe Installing service ExitClosuresAlertSvc... Creating EventLog source ExitClosuresAlertSvc in log Application... An exception occurred during the Install phase. System.Security.SecurityException: Requested registry access is not allowed. The Rollback phase of the installation is beginning. See the contents of the log file for the D:\HrmsAlertSvc\HrmsAlertSvc.exe assemb ly's progress. The file is located at D:\HrmsAlertSvc\HrmsAlertSvc.InstallLog. Rolling back assembly 'D:\HrmsAlertSvc\HrmsAlertSvc.exe'. Affected parameters are: logtoconsole = i = logfile = D:\HrmsAlertSvc\HrmsAlertSvc.InstallLog assemblypath = D:\HrmsAlertSvc\HrmsAlertSvc.exe Restoring event log to previous state for source ExitClosuresAlertSvc. An exception occurred during the Rollback phase of the System.Configuration.Inst all.AssemblyInstaller installer. System.UnauthorizedAccessException: Access to the path 'D:\HrmsAlertSvc\HrmsAler tSvc.InstallState' is denied. An exception occurred during the Rollback phase of the installation. This except ion will be ignored and the rollback will continue. However, the machine might n ot fully revert to its initial state after the rollback is complete. The Rollback phase completed successfully. The transacted install has completed. The installation failed, and the rollback has been performed.
  13. i am not able to install windows service in "Microsoft windows server 2003". when i am trying to install windows service i am getting exception "System.Security.SecurityException: Requested registry access is not allowed.". I have all admin rights and also i have run command prompt as administrator.
  14. Difference between https and http in iis during web hosting
  15. I am trying to get data from other server and i get right response as well as below error XMLHttpRequest cannot load http://dex2y.xyrn.com/data/profiledata.json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:56711' is therefore not allowed access. Request: $.ajax({ url: "http://dex2y.xyrn.com/data/profiledata.json", async: false, dataType: "json", success: function (json) { exampleValues = json; } }); Response: { "header": "Bob's Profile", "name": "Bob Robertson", "address": "1010 Some Street, New York, NY, 10001", "phone": "(212) 555-1212", "interests": "Bob likes apples, big ones and floating ones." } and i am not able understand about this error.
  16. What is the difference between _.select from underscorejs and $.grep from jquery. in both function which is fast for getting value.
  17. If you have learn the rules of the game. then you have to play better than anyone else.

  18. If you have learn the rules of the game. then you have to play better than anyone else.

  19. i am going to create a new website , and i am confused about using ADO.net or Entity Framework , I want to know which is better data access technology ado.net or entity framework? can anyone help me about which is better to use and the advantages of each one.
  20. System.FormatException with ScriptManager

    String was not recognized as a valid DateTime. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.FormatException: String was not recognized as a valid DateTime.Source Error: Line 68: <body onload="changeHashOnLoad();"> Line 69: <form id="form1" runat="server" class="w-wppr">Line 70: <asp:ScriptManager ID="ScriptManager1" runat="server" EnableScriptGlobalization="true"> Line 71: <Scripts> Line 72:
  21. System.FormatException with ScriptManager

    we usually get "System.FormatException" when we call first time if we try again we get ok result. i am not able to understand how to manage this time of exception.
  22. difference between model and entity

    i want to know about difference between model and entity. because these word is so close and i am confused.
×