I do apologize if this is the incorrect forum to post.
I have a file which I need to post to a remote client server. I created a .p12 key file from the client web site. Using this .p12 ket file, password information I need to post a file to the server.
Using class, X509Certificate2 from namespace using System.Security.Cryptography.X509Certificates X509Certificate2.
I created a simple C# console application on my laptop using VS 2010, to define the parameters to the .p12 key file, and path to the csv file to post to remote server. I keep getting "Remote Server returned error - 401 UnAuthorized Error". Is there some sort of permission issue on .net end or the client side. The client keeps stating there is no communcation problem on their end.
I have been working on this code for some time now. any ideas is much, much appreciated.
a file which I need to post to a remote client server
I keep getting "Remote Server returned error - 401 UnAuthorized Error".
To me, based on above statements, it looks like the request is not going through. The key created/used is not having correct password or so leading to unauthorized error.
Issue wise, it might be of certificate or the way you are sending/using it to communicate. Ideally, client server must be setup to accept calls with proper certificate(having correct password) for handshake permission. Error wise, the communication is not as per expected. Talk to someone on client side, make sure you are communicating correctly and the certificate-password is valid.
We have tired of ton JS code in our applications, when errors could occurred in runtime (and specific browsers only).
So we decide to write something which allow to build rich client-side (single page as well) web applications on C# using our Incoding Meta Language.
It's simple - you define the tag behaviour on C# and then it parsed using our JS engine. Any js library could be plugged in, like we did for the Jquery UI (dialog, slider), Google Maps (show map, add/remove marker), BlockUI...
No trial, no donate. Just Open Source. We would like if someone would say "that's cool, i will try!" and give any feedback (critics are welcome).
I know some questions would be like "we need to learn this before start using, why do we need that if we already known js?".
- I would answer by asking another thing:
"What if your teammate (or another developer) leave some code for you and you need to understand what the hell this js construction is and first of all, where to find that event handler?"
With this approach, you just find the element on page and see what the behavior defined in C# well typed code.
You may kick me for the spam, but I just want to discuss:
1) If this type of approach could be alive or not?
2) What are your suggestions? Do you use something else to exclude such problems like we have had to write this?
P.S. We have all current projects using this. And there are server-side features as well.
Such that an authenticated user can process one or more sales in an instance
And the issue with it? You can use Session variable to keep track of the current authenticated user and use that for multiple calls.
is it possible to assign a Session object a value that is returned from a process after the Application had already started and running
Not sure what application you are talking of here. If you are talking of your web application, then yes, sessions can be defined and assigned values later in the workflow as and when required.
Sounds like state management article should help you.
Depending on the requirement/security/performance/UI implementation, there can be various ways to pass on data from one page to other.
You can use Querystring, Session, PreviousPage, etc.
i am an electrical engineer but interested in programming . i developed one v.net project for office and now wanna use send sms coding... the coding is as below but i am not getting message... please help... thanks in advance
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim SMSPort As SerialPort = New SerialPort
.PortName = "COM7"
.BaudRate = 460800
.Parity = Parity.None
.DataBits = 8
.StopBits = StopBits.One
.Handshake = Handshake.RequestToSend
.DtrEnable = True
.RtsEnable = True
.NewLine = vbCrLf
If SMSPort.IsOpen = True Then
SMSPort.WriteLine("AT" & vbCrLf)
'set command message format to text mode(1)
SMSPort.WriteLine("AT+CMGF=1" & vbCrLf)
'set service center address (which varies for service providers (idea, airtel))
SMSPort.WriteLine("AT+CSCA=""9848001104""" & vbCrLf)
' enter the mobile number whom you want to send the SMS
SMSPort.WriteLine("AT+CMGS= ""9494949494""" & vbCrLf)
SMSPort.WriteLine("aaaaat" & vbCrLf & Chr(26)) 'SMS sending
Nutshell: ASP.NET does NOT have any inbuilt API support to send out an SMS. You need to go for a third party solution or use something that is found on the Internet. Articles and discussions above should help you out.
I need to take the main parts of a C# 2008/2010 console application and turn it into a thin client for the web. The only things that need to be displayed on the screen is to enter the customer number and where to obtain a file in a directory path. The user will it the enter button and the application will pass the information to a web service.
Notes about the code that will be used: 1. the application uses linq to sql to point to a sql server 2008 r2 database.all parts of the exisitng code is placed together. there is no separation of data, presentation from business logic.
The simple application will not be part of any other web application.
Can you tell me the following:
1. How will the user start the application? Would it be a url on the web and/or a shortcut on their desktop? How would you setup the code for the user to click on a desktop short and/or point to a url?
2. When you start the code from scratch, what kind of a web application would I use? web forms since that is the easiest.
So your making a windows app to talk to a web service? If your making a windows app, you have to connect to a web service, that is cross domain capable. Then it doesn't matter what connects to it. It would be a ashx page I think, just pure code, no web form or HTML elements in it.
I don't understand the question, sort of goes around in circles.
I will describe the current C# 2008/2010 application and then I would describe what I would like to do with a 'new version (clone) of the 'second' program.
The current application and that will not be modified does the following:
1. A driver program (C# 2010 desktop/console) calls the 'second' program with parameters it needs for the particular run.
2. The second program calls a web service that is supported by another company to upload and download documents from the web service.
The 'new version (clone) of the 'second' program:
1. The new version of the 'second'program listed above will do the following:
a. A user will access a C# 2010 web form page to enter client number, point to a directory path of where files are located that need to be uploaded to the web service, and click a submit button,
b. The web app will then use the 'existing code' it copies from the progam listed above to load documents to the web service and receive a repsonse fromn the web service.
Sorry, I was busy with my project, and some ads I placed, nothing came to me.
If it was me, I would experiment with the final web service first, and prepare or create something to package the data first, to send to the web service, and create something to read the response from the web service. While doing that, I would create a test program in windows, to transmit the data, and read the data returned. Then try something with a web form, and see which works better, or just create both.
I stuck on this error message. can any one give me a hint?
in my code behind(ASP.net C# web form programming), I try to evaluate a session variable, then execute some codes... debug pops this error message(see below) every time when it runs into the session evaluation line. What is proper setting in webconfig to fix this? can u give a complete sample. I tried as message suggested, it still pops.
if (Session["name"] == NULL)
Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the \\ section in the application configuration
Is it possible to display a message in browser console window by coding in code-behind.
But I am looking for a way to set message in Browser console so that I can have easy access to it without disturbing its normal operation when code is set up on server.
I have an requirement,where i need to get the list of pages of an Facebook Account.
For eg : if the user has 3 pages,then if i select the 1st page and click on post,then the information should be shown in that particular page.
i tried from manage_pages in facebook,But not sure how to get the list of pages,Please advice me on how to accomplish this.
I use to bind years ago, but overall in the end, the bindings have to be recreated if you move your project to another server or something. And it was so slow, because the binding code has to be created every time it's used.
So you create a function to load the data, and package the data in a class or structure, and loop through the class or structure records. Something like below code, that's just off the top of my head in vb, but you should get the idea.
Public p_StateName asstringPublic p_StateAbbr asstringEndStructurePublicSub load_States()
Dim p_stateCount asInteger = get_StateNames_Count()
Dim sSn(p_stateCount) as structure_States
Dim dwExitCode asInteger = load_StateNames(sSn)
if (0 = dwExitCode) thenFor idx asInteger = 0to sSn.length - 1
ddl_StateNames.Item.add(new ListItem(sSn(idx).p_StateName, sSn(idx).p_stateAbbr))
NextendifendSubPublicFunction load_StateNames(ByRef s_StateNames() as structure_States) AsIntegerDim dwExitCode asInteger = 2'Do Database Read
I have a great opportunity at work to get to learn ASP.NET. One of the project I need to work on is to design a web form for software registration. However, I do not know ASP.NET that well... actually not at all. I was wondering if any of you can recommend either books or web sites that you found that was helpful in learning ASP.NET.
By the way, I am not asking for a Google search of "Asp.net Tutorials" what I am asking is what tutorials have you found helpful in learning ASP.Net.
Not sure if that helps at all but I am using VS2010 and using C# for the behind code.
However, in working with a lot of developers over the years, you don't want to focus on the specifics of ASP.Net, which is just a server-side HTML-generator, essentially. Since it's generating HTML, and the browser only understands HTML, an ASP.Net developer who isn't an EXPERT in HTML is going to have difficulties. So, my suggestion, to become a good ASP.Net developer, is to go learn HTML5/CSS3/JQuery and how to build pages using only that stuff. THEN, you will be competent at programming the ASP.Net server to emit HTML pages.
One of the best tutorial sites on the web is Codecademy - interactive tutorials which run automated tests against your code to check your work. I've done almost all of their tutorials on various languages, and I highly recommend doing their basic web development tutorials, AND the advanced ones about JQuery and you should also pick an API like Parse, and learn that too. This will give you a holistic view of current web programming languages, and a simple introduction to all of them.