C# - WCF/WIF STS Remember Me Function - Saving The STS Token On Server
Mar 9, 2012
I have a asp.net website. The asp.net website connects to a wcf service. The wcf service is using a sts(security token service) with custom username/password authentication. The asp.net page has a simple username and password login form. Now I'd like to implement a "remember me" function. At the moment I have two solutions: Saving the entered user and password on the asp.net server and set a cookie with an ID. Saving the STS token on the asp.net server and renew it if needed. What is the more secure solution? Do you have any other ideas?
ive two custom controls, which are used to draw and edit etc...(like paint but customized....) i want to save their images with a single click....So im using the Getimageofcontrol function to do it....its code is below:::
Public Function GetImageOfControl(ByVal c As Control) As Image Dim rc As New Rectangle(c.PointToScreen(c.Location), c.Size) Dim i As Image = New Bitmap(rc.Width, rc.Height)[code].....
and the code to call this function for saving the images is simply.. ...
How am i going to make a token with this string"The quick brown fox jumps over the lazy dog" that its output would be:
the quick brown fox jumps over the lazy dog
Token:9
The token is equal to the number of words. For every word entered, to identify it as a word is a space, which means that the space serves as a counter for the token and the words entered are printed in that kind of output.
I am using The Facebook-C#-Sdk v5.0.3 to create a non-canvas webforms app in vb.net and i am having trouble exchanging the returned facebook code for the access_token. Does anyone have an example (C# or vb.net) that I can look at
Forgive me if this has already been covered in a previous post. I am considering using VB.net for a project but need to know before I dive in if it can perform this particular functionality. The application I wish to develop would need to be able to create html and email templates using variable tokens - what I mean is that users would need to be able to insert into their html or email template previously assigned variables that would send dynamically generated text from the database - so, for example, they could write in their template {title}, or {firstname} {lastname} which would then be replaced by the data from the db.
i have been visual basic 2008 to create a program which contains a lot of images nearly 1000 my computer is running vista with a 2GB RAM and over 5GB of space free..i keep getting a message about ~"Token Endelement would result in an invalid XML file"~ it then offers me to "save as" it then becomes very slow and will take a while to allow me to get another "token endelement message".i also get one about "exception of type 'system. outofmemory exception' was thrown" the last message, after getting several of the above is "cannot be completed"..i will put a link of my program files (not the images) and would ask for any help as soon as possible as this would save me quite a bit of data i can't remember when i last saved it!
I have the following code. I am loading the xml file, it's fine. When get into my loop and try to read the line I get unhadled exception and the following error 'Part ID="1"/SalesPrices/OrderPrice/GrosscostsAPiece' has an invalid token. I have discovered that the reader is not liking the Part ID="1" part. How to overcome this problem considering the xml will always have that element as it is. Need to extract the value in the GrosscostsAPiece element.
document.Load(xmlFile) for Each element As XmlElement In document.SelectNodes("document/body/Parts") arr(1) = element.SelectSingleNode("Part ID="""1"""/SalesPrices/OrderPrice/GrosscostsAPiece").InnerText Next
An error occurred while saving the Panel. System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.ThrowHelper.ThrowArgumentOutOfRangeException() at System.Collections.Generic.List`1.get_Item(Int32 index) at PanelController.Save(Int32 ID, FormCollection FormValues)
During debugging, I checked the parameter it was adding to the save stored proc, and the ID it was adding was 0. Then, when it used this
my code doesn't show anything when ever I start on my button "start recording" it starts to record every keystroke on the and show it in a textbox and after that i am trying to get that data into text of a sql 2005 database with vb vs2008 but when ever I click on the button to show me the saved data , retrieve from database, it doesn't show anything, why?
and I also want to create new row everytime the new object is created...thnx
Databse Class
[code]
Imports System.Data.SqlClient Public Class DataSaver Private sqlConnection1 As SqlConnection
I would like to be able to save to a db and send task to email or as text msg for instance nevermind that.. I have two variables of type ArrayList they are "_mList1" , "_mList2" and "_mList3"
_mList1 stores the list of Telephonenumbers , _mList2 stores the list of StaffIDs and _mList3 Some concatenated string.
theses variable lists will hold some data in runtime as explained and i would like to use them to populate a DB table again mentioned
I'm trying to write code in .NET 2.0 to change the time zone - long story short its toautomate server deployment. I'm having a problem adding the SE_TIME_ZONE_NAME privilege I found code online to add the SE_SHUTDOWN_NAME privilege which I adapted into the following code:
I have been trying to write a third-party status console for one of the applications I work with. I am unaccustomed to using pinvoke commands, but found some tutorials and attempted to use ReadProcessMemory from kernel32.dll:
<DllImportAttribute("kernel32.dll", EntryPoint:="ReadProcessMemory", SetLastError:=True)> _ Private Shared Function ReadProcessMemory(<InAttribute()> ByVal hProcess As
I have binded a textbox to a column in a SQL Server 2005 Database, when i fill the dataset it displays the data, but when i click the save button it doesn not save the changes to the database. I used this same code to do a Datagridview and it worked fine. [code]
i am trying to save data from vb.net form in sql server 2008 below is the code which i am using but the only problem is . i am not getting any error instead the data which is being saved in sql server in my First Name , Last Name and Address fields is not the one i insert into textboxes, when i check the backend it shows me my field values as first name , last name and address.
Dim FirstName As String Dim LastName As String Dim Address As String
i want to save a finger print file to a sql server table and then i also wanted to read it when you tap the finger print reader and it will input a time in :)
I have a table in SQL Server with a field defined as Varbinary (MAX). In VB I am trying to save an image to the table. The file I'm using is 139kB in size and I get no errors but when I look at the record, the Attachment column where my image stream should be is empty. The rest of the information is saved. I checked the buffer and it grabs the correct size of the file (141475) so I'm very sure it's found and loaded the image.
Could the parameter from the SQL not be passing the binary value to the parameter properly?
We are developing applications using VB .NET as front end and SQL Server as back end. We want to store and retrieve pictures in a database. We do not want to store the pictures directly into the database but rather the path of the pcitures so that through the same paths we can retrieve them.
Ok. So I have a form, a textbox, and a RichTextBox. In the RTB, there is justsomemiscellaneoustext. In the textbox, it says "Save "Test"". When I press Button1, I want my program to parse the text in the textbox, find "Save", and realize that means to save the text in the RTB to a txt file with the name "Test" (the text next to 'save' in quotes).
I have a couple quick questions with the program that I am doing. This program is a hilo program and here are my remaining issues...
1. When I click the high or low button in my program it does not make changes to my token (I want the default tokens to be 100 and added 100 to the text property of my textbox so want to make sure I did that right)
2. In my program it only shows 13 possibilities but want to have the ability to add more
3. I also would like to change 1 to ace, 11 to jack, 12 to queen, and 13 to king and would like to get some assistance with that as well
I have been learning a bit of jQuery and .Net in VB. I have created a product customize tool of sorts that basically layers up div and add's text, images etc on top of a tshirt.I'm stuck on an important stage!I need to be able to convert the content of the div that wraps all these divs of text and images to one flat image taking into account any CSS that has been applied to it also.I have heard of things that I could use to screen capture the content of a browser on the server which could be possible for low res thumbs etc, but it sounds a little troublesome! and it would really be nice to create an image of high res.I have also heard to converting the html to html5 canvas then writing that out... but looks too complicated for me to fathom and browser support is an issue.I'm thinking perhaps I could do with two solutions for this. Ideally I would end up with a normal res jpg/png etc for displaying on the website, But also a print ready high res file would be very desirable as well.
I have a string with Binarydata that is 64bit. I want to store this data into SQlServer database and the column is varbinary(Max).When I pass the string I am getting an error saying string cannot be converted into varbinary.
I am trying to save(export) data from a table in sql 2005. the version of office used is 2007.
I through something together quickly, thinking it would work.. but now I am not sure why its not.? everything seems to work, no errors or anything.. just no excel file either.
Try Dim strfilename As String = "" Dim intOpenResult As Integer = vbOKCancel
I am wanting to create my own version of MSN and I want to save rego information that the user can do just in frmRegistration to my server, what is the best way to do this?
I'm working in .NET solution Visual Basic that makes reporting of a database using Crystal Reports for .NET, and I want to store each report after it been generated in the database in xml or in PDF just tell me how?
I use an XPathNavigator Select to get a node iterator in the code below and get an invalid token error. If I take out the @contract I do not get an error. I then have to use MoveToAttribute, which works, but shouldn't be needed. Why do I get an error when the @ syntax is valid XPath?
A variety of files (pdf, images, etc.) are stored in a ntext field on a MS SQL Server. I am not sure what type is in this field, other than it shows question marks and undefined characters, I am assuming they are binary type.
The script is supposed to iterate through the rows and extract and save these files to a temp directory. "filename" and "contenttype" are given, and "data" is whatever is in the ntext field.
I have tried several solutions:
1) data.SaveToFile "/temp/"&filename, 2
Error: Object required: '????????????????????'
???
2) File.WriteAllBytes "/temp/"&filename, data
Error: Object required: 'File'
I have no idea how to import this, or the Server for MapPath. (Cue: what a noob!)
This works, but the file should be saving to the server instead of popping up save-as dialog. I am not sure if there is a way to save the response to file.
When I try to call a [Java] web service from .NET, I am getting what appears to be a security credentials issue. CWWSS5509E: A security token whose type is [http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken] is required.Is it even picking up the credentials that I am trying to pass? At this point, I just want to make contact with the web service and get access. In my example, ServiceReference1 is a generated Web proxy class.
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim myLocateProfileBySourceSystemId As New ServiceReference1.locateProfileBySourceSystemId