Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

Satish_S

@Satish_S
About
Posts
131
Topics
55
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • WCF on IIS 6
    S Satish_S

    Yes i am accessing client on the same machine. sorry typo error when composing a message but my REST client is having the following URL http://localhost/Service/service.msc Even i tried from different machine with the following http://172.29.xxx.xx/Service/service.msc In both scenarios i am getting the following page saying my service living but not able to post a request.

    You have created a service.

    To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:

    svcutil.exe http://development.co.in/DWebServices/CDataService.svc?wsdl

    This will generate a configuration file and a code file that contains the client class. Add the two files to your client application and use the generated client class to call the Service. For example:

    C#

    class Test
    {
    static void Main()
    {
    CDataServiceClient client = new CDataServiceClient();

        // Use the 'client' variable to call operations on the service.
    
        // Always close the client.
        client.Close();
    }
    

    }

    Visual Basic

    Class Test
    Shared Sub Main()
    Dim client As CDataServiceClient = New CDataServiceClient()
    ' Use the 'client' variable to call operations on the service.

        ' Always close the client.
        client.Close()
    End Sub
    

    End Class

    when i try to access its method by the following http://172.29.xxx.xx/Service/service.msc/methodcall [method :POST] { "json format inputs" }

    ASP.NET csharp wcf sysadmin windows-admin json

  • WCF on IIS 6
    S Satish_S

    Hi i am running wcf service in IIS, when i make a POST request from the rest client with .net development environment server i am getting the break points hit and the service is responding but when i am accessing through IIS URL(http://localhost//Service/service.msc) it fails and i am not getting break points hit and getting message

    HTTP/1.1 404 Object Not Found

    . i am confused that why the service is not responding when i accessed the iis deployed service. it will be very helpful if i am getting out from this issue. thanks

    ASP.NET csharp wcf sysadmin windows-admin json

  • WCF Service
    S Satish_S

    Hi I have created a WCF service and hosted the service as a windows service, i am able to browse from the browser like

    http://localhost:8080/webservices/dataservice.svc?

    when i browse i am getting the intro screen saying about svcutil.exe and generating proxies. i have some 2 methods inside the WCF service and is running as a windows service.when i make a call to the service in order to call and execute the function inside it , i am not getting any reply but always it shows the intro screen with metadata. How to call the method inside windows service(WCF service as windows service) method call from browser

    http://localhost:8080/webservices/dataservice.svc/GetQuote

    procedure created to make wcf as winservice

    public class ServiceProjectInstaller:ServiceBase
    {
    public ServiceHost serviceHost = null;

       public ServiceProjectInstaller()
       {
           //Name of the Windows Service.
            ServiceName = "WCFService";
       }
    
        public static void Main()
        {
            ServiceBase.Run(new ServiceProjectInstaller());
        }
        //Start the Windows Service.
        protected override void OnStart(string\[\] args)
        {
    
            TraceWinService("Starting a Service");
    
            Timer timer = new Timer();
            timer.Elapsed += new ElapsedEventHandler(OnElapsedTime);
            timer.Interval = 60000;
            timer.Enabled = true;
    
    
            if (serviceHost != null)
            {
                serviceHost.Close();
            }
            //Create a ServiceHost for the CService type and provide the base address.
    
            serviceHost=new ServiceHost(typeof(myService.dataService.CDataService));
    
            // Open the ServiceHostBase to create listeners and start 
            // listening for messages.
            serviceHost.Open();
    
        }
        private void OnElapsedTime(object source, EventArgs e)
        {
            TraceWinService("Another Event at: " + DateTime.Now);
        }
        protected override void OnStop()
        {
            if (serviceHost != null)
            {
                serviceHost.Close();
                serviceHost = null;
            }
        }
        private void TraceWinService(string content)
        {
            FileStream fs = new FileStream(@"d:\\ScheduledService.txt", FileMode.Open, FileAccess.Write);
            StreamWriter sw = new StreamWriter(fs);
    
    ASP.NET csharp wcf tutorial question

  • The process cannot access the file because it is being used by another process.
    S Satish_S

    Hi

    baseDire + file.GetName()

    i guess you need to check the path, you have checked the existence of the directory but not appended to when giving to the file Save AS. Hope this will help.

    ASP.NET csharp asp-net com sysadmin

  • asp.net toggle image
    S Satish_S

    You are Welcome.

    ASP.NET csharp asp-net tutorial

  • asp.net toggle image
    S Satish_S

    Hi

    Specified argument was out of the range of valid values. Parameter name: index

    the above error will occur if GridView1.Rows(i).Cells(2).Controls(0)is exceeding its range. check for the columns you have in grid, if suppose if you have only one row with 1 cell then grid you will receive the error as you mentioned. Try to use Immediate window when you are debugging and check by copying "GridView1.Rows(1).Cells(2).Controls(0)" , if it throws error reduce the row and cell index numbers. Hope this will help. thanks

    ASP.NET csharp asp-net tutorial

  • File name contains garbled or special characters when download.
    S Satish_S
          filename1 = "のサンプル";
          Response.Clear();
          Response.ContentType = "text/comma-separated-values";
          Response.ContentEncoding = System.Text.Encoding.GetEncoding( 932 );
          Response.AppendHeader("Content-Disposition", "filename=\\"" +   filename + "\\"");
          Response.WriteFile(filepath);
          Response.Flush();
          System.IO.File.Delete(filepath);
    

    Above code is used for downloading japanese file, when using as above i am getting file downloaded but the file when it shows in file save as dialog contains some machine mixed special characters(non ascii). expected file name is

    のサンプル

    .xls and not like "a1/4a...." How to over come this issue. Hi As i found in the forum link i used this function to convert file name but this too didnt helped me out.

    public static string EncodeTwit(string txt)
    {
    UTF8Encoding utf8 = new UTF8Encoding();
    byte[] bytes = utf8.GetBytes(txt);
    char[] chars = new char[bytes.Length];
    for (int index = 0; index < bytes.Length; index++)
    {
    chars[index] = Convert.ToChar(bytes[index]);
    }

        string s = new string(chars);
        return s;
    }
    
    ASP.NET database help tutorial

  • window.location.replace
    S Satish_S

    Really thanks for your time & reply.... Your answers are really helped me out very well to debug depth about URL encoding cooncepts. In the mean time i have gone through some articles about this issue and tried by returning false after a function call. And also where i am using location.replace(url). now it is working fine but yet to test in all scenarios and all browser versions. i will get back to you on the said time tommorrow. bye take care.

    ASP.NET javascript sysadmin security help question

  • window.location.replace
    S Satish_S

    Really thanks for your time & reply.... Your answers are really helped me out very well to debug depth about URL encoding cooncepts. In the mean time i have gone through some articles about this issue and tried by returning false after a function call. And also where i am using location.replace(url). now it is working fine but yet to test in all scenarios and all browser versions. i will get back to you on the said time tommorrow. bye take care.

    ASP.NET javascript sysadmin security help question

  • window.location.replace
    S Satish_S

    if(xmlhttp.status == 200) { switch (xmlhttp.responseText) { //If the browser connected to remote MFP (For Anonymous connections). case "authenticationrequired": //Generate random number and attach it to the endpoint to avoid caching problems. randomNumber = Math.round(100000*Math.random()); url = "Authentication.aspx?host=" + host + "&port=" + port + "&targetName=" + targetName + "&imageMode=" + imageMode + "&randomNumber=" + randomNumber; // url=encodeURIComponent(url); alert(url); // // window.open(url); window.location(url); default: case... } }

    ASP.NET javascript sysadmin security help question

  • window.location.replace
    S Satish_S

    Authentication.aspx?host=172.2.542.166&port=5900&targetName=172.2.542.166&imageMode=Color&randomNumber=15563 this is the one i am getting thru alert. thanks

    ASP.NET javascript sysadmin security help question

  • window.location.replace
    S Satish_S

    url = "Authentication.aspx?host=" + host + "&port=" + port + "&targetName=" + targetName + "&imageMode=" + imageMode + "&randomNumber=" + randomNumber; As you suggested i used as below,but that too didnt helped me out. url=encodeURIComponent(url); window.location.replace(url); (Authentication.aspx%3Fhost%3D172.2.542.166%26port%3D5900%26targetName%3D172.2.542.166%26imageMode%3DColor%26randomNumber%3D79148) this is the url i need to redirect to, i am getting break point in c# but my client side not getting executed.even i placed an alert in body onload,alert is not shown.this is happening in IE9,FF,chrome all this are HTML5 new browsers. thanks for the reply..

    ASP.NET javascript sysadmin security help question

  • window.location.replace
    S Satish_S

    thanks for your time & reply... Encoding also didn't helped me. the page getting opened when i am using window.open("URL"); but not when using window.location.replace("URL");

    ASP.NET javascript sysadmin security help question

  • window.location.replace
    S Satish_S

    hi i have following line of code randomNumber = Math.round(100000*Math.random()); url = "sample.aspx?host="+host+"&port="+port+"&targetName="+targetName+"&imageMode="+imageMode+"&randomNumber="+randomNumber; alert("callbegins:Authentication.aspx"); location.replace(url); alert("callends:Authentication.aspx"); break; in the Authentication.aspx page i have the client code which connects a device. when the line of the above code getting executed it is redirecting to the URL server side but my javascript code are not working. when i call alert after replace then the page getting redirected and client code is getting excuted. i am confused that why when putting alert after replace it is redirecting and calling client code but when the alert commented then the client code not working. this issue is in fire fox, and in IE9 its not at all redirecting if alert also there. please clarify me why this happens thanks

    ASP.NET javascript sysadmin security help question

  • ModalPopUpExtender Not showing on IE9
    S Satish_S

    hi please check the forum link i verified and replied,last two threads. http://forums.asp.net/p/1196760/4599684.aspx/1?p=True&t=634517342714189446 hope this will help. cheers -sathi

    ASP.NET help tutorial

  • App_GlobalResources.resources.dll
    S Satish_S

    Hi Thanks for your reply.. i found with the help of some articles that those dll's are satellite assemblies created with the help of resource file and because of App_Globalresources Folder not exists in previous versions of .NET Frame works, those compiled assemblies were used and also when delivering application to give as satellite assemblies is used. so those dll's are satellite assemblies with the help of resource files.

    ASP.NET tutorial

  • App_GlobalResources.resources.dll
    S Satish_S

    Hi I have a existing project and in the proect App_GlobalResources folder i have dll for every .resx file, for example if i have admin.en.resx then i have one dll as admin.resources.dll. i open the dll to read its manifest but no methods listed, i want to know why that dll needed and how it generated. thanks

    ASP.NET tutorial

  • try/catch
    S Satish_S

    ID col1 col2 col3 col4 rescol
    121 0 1 2 6 YES
    122 0 1 2 6 YES
    123 0 0 9 0 NULL

    Above are the Sql rows and if my function finds null for the ID=123 as 9 of col3 then i need to locate for before id's rescol and if that also find as null then i need to fetch for the above row of 121, like this till i am not getting res col as null i need to fix a loop how can i do this? In try catch block i am handling the above mentioned functionality as if i get error my catch block will call its above row's rescol value. but how many catch block i will put here because the rows are dynamic and unknown how many catch i will get executed.

    ASP.NET help question database

  • Visual Studio Team Suite UNIT TESTING
    S Satish_S

    How can i test .aspx pages through VSTS Unit testing?

    ASP.NET question csharp visual-studio testing collaboration

  • NUnitTest
    S Satish_S

    hi i need to test the UI page which has two radio buttons. According to the selection of radio button by users functions will be called and those function uses 5 class files and in turn 5 methods. now i need to APPLY UNIT Test on above said functionality, how can i achieve this? what are the steps i need to start with.

    ASP.NET question design testing
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups