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
M

meeram39

@meeram39
About
Posts
35
Topics
18
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to invoke POST method by adding [FromBody] attribute in Postman tool
    M meeram39

    Yes. Thank you Richard. I have done that in the meanwhile,and got it worked.Thank you. Worked both in Postman and Fiddler.:thumbsup:

    ASP.NET json help tutorial question

  • How to invoke POST method by adding [FromBody] attribute in Postman tool
    M meeram39

    I have a POST method with [FromBody] attribute. I tried to call the same from PostMan. But everytime Postman gives 404 error. The Web Api is not hitting at all. Following is my source code:

    [HttpPost]
    [Route("api/CustomerService")]
    public HttpResponseMessage GetServiceChats([FromBody]string to, string from)
    { }

    What I have done is, I added the parameters by Selecting Body-->raw-->JSON options and type the parameters as below:

    {
    "to" : "919191919191",
    "from" : "90909090900"
    }

    What could be the probable reason? If the same I attached in URL without the FromBody attribute, it works. Please provide any suggestions.

    ASP.NET json help tutorial question

  • How to invoke Web API in console or service application?
    M meeram39

    Thank you Richard. I think if you can clarify little bit on first portion of your reply, I will be able to fix my issue. In my console application, I have invoked the API as below:

    class Program
    {
    static void Main(string[] args)
    {

            RunAsync().GetAwaiter().GetResult();
            Environment.Exit(0);
        }
    

    static async Task RunAsync()
    {
    string httpReasonStatus = string.Empty;
    int reasoncode;

            using (var client = new HttpClient())
            {
                string baseURL = ConfigurationManager.AppSettings\["APIURL"\].ToString().Trim();
                client.BaseAddress = new Uri(baseURL);
                //client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("OAuth","xyz");
                client.DefaultRequestHeaders.Accept.Clear();
                client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
    
                Console.WriteLine("Get");
                HttpResponseMessage response = await client.GetAsync("/api/SendBulkSMS");
                if (response.IsSuccessStatusCode)
                {
                    reasoncode = (int)response.StatusCode;
                    httpReasonStatus = response.ReasonPhrase;
    
                }
                else
                {
                    reasoncode = 0;
                    httpReasonStatus = "error";
    
                }
    
            }
        }
    }
    

    How would you call the Console application once, and then use the Windows Scheduler to schedule the application without using Sql tables. I am also not in favour of using Sql tables, and looking for any other better ways. Can you please provide any guide on this? Thanks a lot for the support.

    C# database question json help tutorial

  • How to invoke Web API in console or service application?
    M meeram39

    I have a Web API to send SMS to customers. Web API is up and running 24/7/365. Web API is running fine without any issues. However, I am invoking the API everytime through PostMan tool. In order to avoid this manual intervention, I have written a console application, but that console application sometimes works, sometimes didn't. it stops abruptly without any reason, I tried to catch error, but no effect. The application has to run automatically with an interval of 5 minutes in day. Every 5 minute it has to run. If already previous task is running, then no need to start a new task. I have implemented this by using a ProcessMap table in Sql DB. So each time it starts, it checks if any sms task is running. if running,it will not start new, otherwise starts a new task. My question is , is this the correct way to invoke the API automatically or is there any other better way to do this? Kindly hep.

    C# database question json help tutorial

  • How to search data from Sql Server using Lucene.net
    M meeram39

    Please ignore this question.. Sorry

    C# database csharp sql-server sysadmin help

  • How to search data from Sql Server using Lucene.net
    M meeram39

    I have gone through various articles on Lucene.Net which is a search engine library. I understand that Lucene creates an index on the document saved in the RAM or custom directory. But what I am not understood is how Lucene will help if the data needs to be fetched based on some condition from Sql Server? Should I create the document first by getting the required data from database ? Basically I want to know whether it is possible to fetch DB data using Lucene.. Please help.

    C# database csharp sql-server sysadmin help

  • Sending Bulk SMS using Multi Threading
    M meeram39

    I have a design issue in my code which I want to clear off. I have an SMS data contains lakhs of records group by an Unique Code in my C# appplication. So under each Unique code, there will tens/thousands/lakhs of records to sent. So currently, applications picks up one Unique code, select all the unsend records and send. Then move forward and picks the next one like this going one. This is creating more delay in sending and clearing off the sms in a single day where we have lakhs of sms to send. So I think of converting the same to Multi-threaded application, so multiple threads starts at same time, picks up each unique id set and select records to sent, there by running two / three process running at same time, and it will be faster, i believe. Please advise if this is the correct method to implement or is there any other better ways.

    C# csharp design help

  • HTTP Error 502.5 - Process Failure while publishing ASP.Net Core 2.1
    M meeram39

    The issue was resolved. The issue was with the Web.config. Web.config should be similar as below once deployed to server:

    ASP.NET asp-net help csharp html dotnet

  • HTTP Error 502.5 - Process Failure while publishing ASP.Net Core 2.1
    M meeram39

    I am trying to deploy my aspnet core application in IIS, and followed the guidelines provided in this [URL]as well as in this[Host ASP.NET Core on Windows with IIS]. When I checked the Eventviewer in the Prod Server, I am getting the error message in Application logs as "

    Quote:

    Application 'MACHINE/WEBROOT/APPHOST/TestAppCore20' with physical root 'E:\TestAppCore20\' failed to start process with commandline '%LAUNCHER_PATH% .\TestAppCore20.dll', ErrorCode = '0x80070002' : 0.

    . While googling for the above resolution, I foundout one solution [here], but again the same status. Please anybody can have a look and help please? My web.config is as follows:

    ASP.NET asp-net help csharp html dotnet

  • Export Access db to Sql Server db everyday
    M meeram39

    I have an MS Access db that needs to export to Sql Server on daily basis. The access database contains numerous tables and views associated with it. Everyday basis, this gets updated and it's ok to replace the database on daily basis. Sometimes the structure remains the same, but the data in many of the tables will be more on each day. Modifications to existing structure is also possible sometimes. So, rather than appending data to the existing tables, I would like to replace the whole database on daily basis in Sql Server and perform operations on it.And it should be scheduled at a particular time. So I am looking out which will be the best option to do the same. Will the SSIS packages helpful? Please suggest possible ways.

    Database database sql-server sysadmin question

  • Unable to connect Oracle database from C#
    M meeram39

    Thank you.

    C# help database tutorial question csharp

  • Unable to connect Oracle database from C#
    M meeram39

    I removed everything and installed fresh everything in C drive itself. So I got tnsnames and sqlnames ora files automatically. I tried ping from DOS prompt using ping and tnsping which was also successful. However, When I tried from dotnet, I am getting an error message, "The procedure entry point ons_init_wconfig_ctx could not be loaded in the dynamic link library oraons.dll". I have installed win64_11gR2_client in Windows 7, and the dotnet version is Visual Studio 2012 Enterprise Edition (Trial). My code is as below:

    private void ConnectOracleDB()
    {
    string sqlstring = string.Empty;
    Logger myLogger = new Logger();

            string myConnectionString = GenerateConnectionString();
            OracleConnection myConnection = new OracleConnection();
            myConnection.ConnectionString = myConnectionString;
    
            try
            {
                myLogger.AddtoLogFile("Trying to connect Oracle DB", "Page Load");
                myConnection.Open();                
            }
            catch (Exception ex)
            {
                myLogger.AddtoLogFile(ex.Message, "Connecting to Oracle DB");
            }
    
            //execute queries
            myConnection.Close();
    
        }
    

    private string GenerateConnectionString()
    {
    return "Data Source=( DESCRIPTION = ( ADDRESS_LIST = ( ADDRESS = ( PROTOCOL = TCP )( HOST = {server ip} )( PORT = 1521 ) ) )( CONNECT_DATA = ( SERVER = DEDICATED )( SERVICE_NAME = {db name}) ) ); User Id= abcd; Password = 1234;";
    }

    Update: I fixed this now, as I copied the same to the bin directory on the Application root directory. But now another error comes as "Object doesn't exist" .. :(( :((

    C# help database tutorial question csharp

  • Unable to connect Oracle database from C#
    M meeram39

    Ok. Thanks. Let me do the exercise once again and will update.

    C# help database tutorial question csharp

  • Unable to connect Oracle database from C#
    M meeram39

    Thanks Dave, I have installed Oracle Client earlier and tried. I have installed 64 bit as well. Then, in one of the forums, it is found that I need to install 32 bit as well, so I installed both. What I will do now is, I will remove everything and start afresh, let me try once again. Meanwhile, could you please let me know where should I find the file tnsnames.ora?

    C# help database tutorial question csharp

  • Unable to connect Oracle database from C#
    M meeram39

    I have an applications that pulls data from Sql Server and push to Oracle database which is in remote server. The remote server can be connected through VPN. Initially I tried to install Oracle client version 11g, and then different versions, but everything failed. My OS is windows 8.1, googled and find out that 11G will not support on Win8.1. So I tried in Windows 7 OS without installing client,using the example given in this link. However I am still getting an error message saying as "Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed". My OS is Windows 7 64 bit. I have downloaded and installed the Instant Client Package - Basic Lite: Smaller version of the Basic, with only English error messages and Unicode, ASCII, and Western European character set support from the Oracle site. I am not sure how to proceed with this. My question is: 1) The connection string provided in the article - I put the host name as Server IP. Is this correct? So where should I put the db name? 2) Should again require a tnsnames.ora file? If so, should I create a new one and put it in the same folder of exe? I am stuck at this point. Please provide any help on this. Thanks in advance

    C# help database tutorial question csharp

  • Accessing SVN Server Repository URL from Client Machine
    M meeram39

    I have installed 64 bit SVN Subversion both on server and client machine. Now, the problem is how should I access the server? I read a lot, but there are no clear cut mentioning what should be done for accessing the Repo Browser URL. What I have done is, 1. Installed 64 bit Tortoise SVN version both in server (eg: 125.5.5.0) and client machine (eg: 125.5.5.40) 2. Created new folders in E drive of server, E:\svn\NewRepository. 3. Then, open command prompt, and run the command

    svnadmin create --fs-type fsfs NewRepository

    This ran successfully and created some configuration files in E drive. 4. I have created manually folders like branch, trunk and tag in E:\svn\NewRepository folder. Now, how will I access this folders from my client machine(125.5.5.40)? should i start with http:// or svn://. Please help. Hope this is the right place,if not let me know. Thanks in advance.

    Hosting and Servers help sysadmin collaboration question announcement

  • Changing Resource files programmatically in ASP.Net 4.5
    M meeram39

    I know that I can retrieve the values in resx files programmaticaly. But, Is there a way to modify the values of existing resx key's? For eg: there is an entry already in the resx file as below: Key: UsernameReqdValidation Value: User Name is required. I want to change this value to 'UserName is mandatory'. Can this can be changed by the user on run time? I googled for a while, but couldn't find any useful stuff. Please help.

    ASP.NET csharp asp-net help question learning

  • Open Source Reporting Tools in .Net
    M meeram39

    Thank you. I have tried this and looks promising...

    ASP.NET asp-net csharp java sql-server visual-studio

  • How to create Custom Project Template in ASP.Net
    M meeram39

    I am looking for creation of project templates. Most of our projects are in similar fashion. It includes ASP.Net 4.5 framework, Entity Framework 5.0, Custom Loggging Framework developed by us internally, and then CSS & Script files. What I wanted is that the User should be able to provide the project name like the one which is provided by Visual Studio New Project Templates. Once the user provided the project name, a new project will be created with all the above said dlls, script files, css files etc. Is there any way which I can develop this custom template. I know that there is something called ASP.Net BoilerPlate. But that is in MVC, and I need in ASP.Net Web Forms. Any article or URL will be greatly appreciated.

    ASP.NET asp-net csharp css visual-studio wpf

  • Open Source Reporting Tools in .Net
    M meeram39

    There are variety of tools in Java for designing and developing Reporting like Jasper, BIRT etc. Does .Net have anything like that? I believe that there are only SSRS which is fully licensed. Earlier Crystal Reports were part of VS, but now, it needs tobe purchased separately. Do we have anything similar reporting designing tool that can be used in ASP.Net or MVC?

    ASP.NET asp-net csharp java sql-server visual-studio
  • Login

  • Don't have an account? Register

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