C# - On Server Side, It's Authenticating Google Service, It's Receiving Auth Code Then It's Invoking To C2dm Send Url?
Dec 22, 2010
I have created an android app, that registering to google c2dm service. And It's getting a registration_id token from c2dm services successfully. I already signed Android Cloud to Device Messaging form and I received confirmation email from c2dm service.Everything seems ok in client side, it's getting registration_id in simulator environment. So, it's ok. But, On server side, It's authenticating google service, it's receiving Auth code then it's invoking to c2dm send url with below code.
public void SendMessage(string registrationId, string data)
{
ServicePointManager.ServerCertificateValidationCallback += delegate(
if it is possible to use a WCF Dataservice as the MemberShipProvider for a forms auth application. I have written code for a provider (below), but I do not know what to do as far as a connection string, or any other web.config properties. Please Help!!! Here is the code for my provider, anytime it says Odbc that is because I based this off of the custom Odbc provider on the msdn site. The only ACTUAL references to any odbc connection are in the comments:
I know that I can receive an javascript object from the server via ASP.NET AJAX using Json. But I am not sure how can I send an javascript object from my client-side javascript to my server-side code. And if I can, how can I extract this object in my server-side code and access its members?
I have a class that is normally compiled into a .dll prior to distribution and used as a component library.
IE: vbc /t:library /out:xyz.dll xyz.vb (User would download then put the .dll in the bin directory and use Imports xyz Dim obj As New xyz ojb.Foo)
There is a need to write a line of content to the class file specific to the user prior to compile.
Is this possible via server side?
I believe my short question would be, can I call vbc.exe from a site hosted with winhost.com and compile a class.vb file through vbc.exe on the server? And how?
I have been able to reach IE via ASP.NET from my account there so I think it may be possible.
I am using an update panel in my application. Inside the update panel i am trying to trigger a html button, which in turn should invoke a server side function after which i need to invoke a client side function.But the client side function is getting invoked first where as the server side function is not getting invoked at all.
If i've the button outside an update panel (basically i'm using RadAjaxPanel by Telerik) it is working fine. But when the button is inside an ajax panel, even if i click OK for deleting the records the server side code is not called.
We are working with a vendor to develop a mobile app and plan on using WCF services to handle operations. What are some types of authentication I can use with a WCF service? Would we send a user name and password through the SOAP header? How can we accomplish this securely?
Also, this will be authenticated against our .NET membership database using the Membership classes.
I have a SqlMembershipProvider store with Roles enabled. This is configured and has the user "devtest" in the roles "xxUser" and "xxAdmin".
I also have a WCF service, which I want to authenticate and authorize against. My problem is that:
the authorisation is not happening, code just executes despite the policy attribute I don't get any identity or security context so do not know who is calling the service I need: to know which user is calling the method some degree of rejecting users if permissions don't match (ideally this should be performed within the RoleProvider/MembershipProvider/WCF but can do it myself if I have to) SSL in transport
I have my service contract set up thus:
[ServiceContract] public interface ISupportService { [OperationContract] [PrincipalPermission(SecurityAction.Demand, Role = "ThisRoleDoesNotExist")] List<BaseInterestRate> GetAllBaseInterestRates(); } the code is simple enough: public class SupportService : ISupportService { public List<BaseInterestRate> GetAllBaseInterestRates() { OperationContext operationContext = OperationContext.Current; ServiceSecurityContext serviceSecurityContext = ServiceSecurityContext.Current; // is always null using (xxxEntities entities = new xxxEntities()) { return new List<BaseInterestRate>(entities.BaseInterestRates); } }} My service configuration is thus: --> <behaviors> <serviceBehaviors> <behavior name="SupportServiceBehavior"> <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="false" /> <serviceAuthorization principalPermissionMode="UseAspNetRoles" roleProviderName="AspNetSqlRoleProvider" /> <serviceCredentials> <userNameAuthentication userNamePasswordValidationMode="MembershipProvider" membershipProviderName="SqlMembershipProvider" /> </serviceCredentials> </behavior> <behavior> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> </behaviors> <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
I have followed the instructions at these pages to the letter:
How to: Use the SQL Server Role Provider with Windows Authentication in WCF Calling from Windows Forms (MSDN) How to: Create and Install Temporary Client Certificates in WCF During Development (MSDN) How to: Use wsHttpBinding with Username Authentication and TransportWithMessageCredentials in WCF Calling from Windows Forms (MSDN) Also quite useful found via SO: Use Asp.Net Membership provider with a WCF .svc service (Alkampfer's Place)
I would at lest expect an issue with certificates/transport/etc. to fail with exceptions, but I can debug right in and over the WCF call. I have no security context/ user context available to me and when I use a user not in the two mentioned roles (which I do in the code example above), I don't get "kicked out".
My client app is currently a Web App, but will ultimately also serve a Windows Forms app and Test suite. I'm currently using the ASP.NET WebDev server and am running .NET 4.0.
in a form i have a buttoin, when click both OnclientClick and postback should happen. on clicking the "Email" button a client side "mailto" tag should do the work and pull a new message window on the client's machine.
whereas, the email addresses should be invoked by the post back. so , when clicking the button the server side post should happen and on return the client side script should be invokded with the values read during post back, and populate all the email addresses.
i need know how to first do a server hit take the values and then execute the client script with those values without using AJAX
If I have a standard HTML textbox: I can retrieve the value using Request.Form. But how do I go about populating this textbox from the server-side? I tried Request.Form["txtTest"] = "blah"; but got a readonly error.
I'd like to invoke a button click event on an ASP.net page programmatically, using c#. I don't have access to the server-side of the page, so i can't invoke the function directly.
How to invoking java web service(WSDL) with c# client (web application).Java web service methods is proxy.object will be created in client C#.Then how to call that proxy method in c# client? how to test that java web service in c# client side?
I am having difficulty deploying a Silverlight 4 RIA services Web app to IIS 6 on Windows Server 2003. The application works fine when running on the development server. However, when deployed to a production server, all the Web service calls redirect to the login page.
Here are the details:
The site uses forms authentication. Login is via an ASP.NET Web page; the Silverlight application does not have its own version of the login page. Login is working correctly.
When a marker is clicked, I'd like to display a popup.
this is easy, my problem is that the popup needs to be updated from the database before and the popup has some links that should be inside an UpdatePanel to avoid refresh.
I can use the marker function to display a popup (with a given html) how to get the html with the updatepanel .
I thougt about using the ajax popup control but I don't know how to position it on the marker.
We're running IIS7 and have windows authentication enabled. Everything else is disabled. When we go to the page though, we aren't prompted for a windows logon, but are redirected to the default forms authentication login page (Accoun
Been scratching my head on this one today quite a bit. Time to ask the guru's.Implementing your basic Forms Auth for a 2.0 web app in conjunction with SQL Membership Provider and Role Provider. Web.Config from virtual directory root
[Code]....
All other subdirectories do not contain web.config files but rather wanted them to just work off inheritence from the root web.config. Upon publishing of this setup - I am having one hell of a time maintaining the user 'authenticated' state. (Not sure if that's the best explanation of what is going on.. but)
I was wondering if it is possible to call a webservice or send a SOAP request using a provided certificate to encrypt my password (my identity) and use another to encrypt/sign a timestamp, service header, & soap body? Does anyone have any material or sample code where I can test encryption and security too? It doesn't have to be my own certificates, I just want to see it work and then I can possibly tailor it to my needs. After the SOAP request, there will be a provided response which I assume I will have to decrypt.
I found this thread, but it doesn't seem to use signatures or an SSL connection. Does VS 2010 have some extra features to help out on this? I believe the SOAP should look like this.
I am working on a client - server application and in which I used to send and receive data through SOAP web service.
Now after sometimes I have heard from someone that I might lost some data while this process on soap service created in ASP.net. So now I have decided to send and receive data through batches like first I will send List of 50 objects and then next 50 and so on...
Now I am new to web services and all.
So my question is "Is it true that we can lost some data sometimes while transferring it through SOAP web service?"
I have an asp.net button, that when clicked calls a code behind function. The function does some evaluation, and then I want to call javascript from within this asp.net function.
I have a simple WCF service that I call server side from code behind via a service reference. It's used for validation and works and was automatically setup by Visual Studio and is using SOAP I think because the binding is wsHttpBinding.
I want to use the same WCF service, but call it client side from jQuery using ajax(). I'm trying to implement it by way of these instructions.
But if I make the changes to get the client side call working, I have to add the decoration below which I think will break what works on the server side and also change the system.serviceModel section in web.config.