WCF / ASMX :: Using Static Hashtable In Webservice For Sharing Common Data Among Different Users

Nov 26, 2010

We are using static hashtable in webservice for sharing common data among different users. Is it safe? Is there any better way?

View 1 Replies


Similar Messages:

C# - Public Static HashTable / Stores Data For A Few Seconds Of Runtime, And Then Data Disappears?

Feb 22, 2011

I have defined a public static HashTable. It stores data for a few seconds of runtime, and then data disappears, and then the HashTable becomes null.What is the issue and how do I solve it?

View 1 Replies

Sharing A Common DAL Between WPF, Silverlight, And .NET?

Oct 5, 2010

What is the best method/technology to sharing the same data access layer between WPF, Silverlight, and ASP.NET? I am using ADO.NET Entity framework, and was thinking of a creating a DAL using the Repository pattern.Then using the RIA Services as a dummy middle man to connect Silverlight and ASP.NET. Is this a solid plan or are there other better solutions out there?

View 2 Replies

WCF / ASMX :: Sharing Data Between User Requests?

Nov 7, 2010

am new to web services and have a quick question. I've some data (an c# class object) that needs to be shared between two different users (of my web service) . all the methods in the web service have a parameter called "sessionkey" which can be used to know what data to share.

i need to know how/where to store this data ?

View 4 Replies

WCF / ASMX :: Bulk Insert Data Into Asmx Webservice?

Feb 24, 2011

I have datatable consist of 20 records and i want to bulk insert into sqlserver through the asmx webservice. Can anybody guide to me or provide Sample BusinessLogic and webservice code.

View 1 Replies

How To Bind Jqgrid With Static Data In .net Without Using Webservice

Jul 7, 2010

i want to bind jqgrid with static data in asp.net without using webservice.

View 2 Replies

Sharing Session Between Webservice And Application

Apr 23, 2010

I have an asp.net application and webservices (asmx) that reside in the same application but not in the same folder of the aspx files. I aslo have a winform application that uses the webservices. I have marked the webservice methods with [WebMethod(EnableSession = true)] but I am not able to share the same session values that are on the application in the webservices. The winform application has access to the sessionID from the application and I am using the following code

Uri uri = new Uri(ServerServiceUrl);
_cookieContainer = new CookieContainer();
_cookieContainer.Add(new Cookie("ASP.NET_SessionId", SessionID, "/", uri.Host));

My question is: Is there something that I am missing or doing wrong that I cannot access the application sessioin from the webservices?

View 2 Replies

WCF / ASMX :: Use Non Static Data In Webservices?

Jan 22, 2011

i m making an API in .net , that will communicate with its client with xml data. client software can be in any language php,asp.net etc. what is the best way to develop such API, i was trying to use the .net webservices', but [webmethods] does not allow non static data, and in my API there are lots of things that will work only with the non static data. any way to develpop it without using .net webservies?

View 1 Replies

MVC :: Sharing The Same Users DB For Several Applications DB

Feb 14, 2011

I begin with MVC and this technology is very efficient !

I would like to create several applications mapped with a common applicaton Users Accounts. The aim is to isolate logical parts. The problem is always the same : how to communicate easily between users db and appli db ? Do I continue to use my poor View mechanism from SQL Server (db1.Users.UserId inner join db2.Users.UserId) or is it a better way with super MVC?

View 1 Replies

Updating Common String By Different Users In Same Page?

Mar 14, 2010

I am newbie in asp.net . I want to develope a chat app by my own for my website. Registered users can chat one on one. My logic is pretty simple....

I have an string msg="";

When a user submits a textbox, textbox's text is added to msg. and then msg is displayed to both the users who are chatting. Then, next user submits his textbox , his textbox's text is also added to the msg, and then msg is displayed to both users.

My problem is this, how can I implement this in asp.net ? How to maintain a global (common) msg (string) to both the users who are chatting. Can I implement this in asp.net?

View 7 Replies

WCF / ASMX :: Read The Set Of Data From Webservice?

Jun 3, 2010

In my project I have have a query in my Webservice

cmd=new SqlCommand("Select * From Record ;",conn);
conn.Open();
DataReader reader=cmd.ExecuteQuery();

now I want to return this Extracted data which may contain various rows and column

How can it be sent.???

One way is to Send it as XML Document But I don't know how to do this i.e. How to convert this set of record in to XML Document. and then How to retrieve values from this Document in a GridView at the requesting side.

View 2 Replies

WCF / ASMX :: Return XML Data With WebService?

Jul 10, 2010

i have a data library dll and first is it possible to use it in webservice forexample i call it as using DataLibrary; then in web method i will use it like

public boolean MethodName(int a)
{
if(DataLibrary.Method(a))
return true;
else
return false;
}

and also i have to tell my all data connections are in DataLibrary.dll

my second question is i will use webservice to communucate with flash i will send flash a DataSet but flash cant read DataSet so i have give it as XML right?

so how could i change my following method which returns dataset to return xml ?

[Code]....

View 6 Replies

Web Forms :: Hashtable Within Another Hashtable?

Dec 15, 2010

i'm retreiving data(API) with JSON format and i'm parsing it inside a hashtable,it seems like some specific keys have a value= hashtable(or arraylist!)below is how i'm extractin the the first layer value

[Code]....

the problem is where the values are equal to arraylist i'm not able to extract themIs there any way to extract the second layer keys and values?<i> (btw i'm very new to hashtables and arraylists)</i>

View 3 Replies

WCF / ASMX :: Passing Variable From Dropdownlist.selectedvalue To Asmx Webservice

Nov 10, 2010

On my page I have a dropdown for country.

On my asmx service I want to get the value of the dropdownlist to filter the next input which will be state/providence.

My code on the asmx:

[Code]....

I want to add another clause to the WHERE statement to restrict Country = @Country so I will need to get that value to the web service.

View 2 Replies

WCF / ASMX :: Import Table Data Using Webservice?

Oct 1, 2010

I'm starting using web services in .net , I'd like to know how to achieve this:

I need to import table data into a database, currently what we do is uploading via ftp the text files, and then running a process in php in the webserver.

Could this be automated by sending those text files (or xml, or whatever format is necessary) to a webservice as an argument, and that the webservice handles the insert and validating process of the data?

View 1 Replies

Cache Sharing - Between Different Users Accessing The Site On Different Computer At The Same Time

Jul 21, 2010

I have an ASP.Net 4.0 web application which very frequently loads data from the database and does heavy calculations on it. I want to cache this loaded and prepared data in a central cache that can be accessed by every user and computer who uses the application.

Simple use-case:

User 1 accesses webpage, cache is empty, data is loaded/calculated, data is cached
User 2 accesses webpage, cache contains data, data loaded from cache
User 3 accesses webpage, cache contains data, data loaded from cache
User 1 reloads webpage, cache contains data, data loaded from cache
Cache expires
User 3 refreshes webpage, cache is empty, data is loaded/calculated, data is cached

I know that ASP.Net has a built-in cache mechanism. What I don't know is whether it can be shared between different users accessing the site on different computer at the same time. I would also like to know how the system behaves in a web farm environment.

View 3 Replies

WCF / ASMX :: Webservice To Import Data From Client Side

Apr 28, 2010

I want to build a webservice that has to get some data as parameter from the client application. the data from the client side are records from there database. my websercie has to send then these data to a soap server through 'HttpWebRequest'. Can i get the data as Datatable? and then send as stream to the soap server? Or maybe there is a better easier ways?

View 2 Replies

WCF / ASMX :: Webservice Architecture In Framework 3.5 To Add Data To SQL 2005?

Apr 15, 2010

I have a webservice(Framework 3.5/VS 2008) that assembles data from 3 other webservices and puts it into SQL Server 2005. The data from these webservices is mutually exclusive. What is the recommended architecture for the same?

View 5 Replies

WCF / ASMX :: Return A Data Record From A Webservice (wsdl)?

Aug 23, 2010

vs2010, .NET 4.0I have a webmethod which I want to return a data record (for example: name, surename, address, age, zip etc)I wonder how to accomplish this. I think the solution is about creating an object which contains all the records serialized. And then the webmethod returns this serialized object. I'm not 100% sure how to accomplish this, if some of you good provide me with some tips, tutorial or link to an article explaining it, that would be great

View 1 Replies

WCF / ASMX :: How To Execute WebService Asmx Link From Default.aspx Page Link Using HTTPRequest And HTTPResponse

Nov 3, 2010

I have spent a couple of days on this one. I have an ASP.NET website that has Linkbuttons on

the Default.aspx page.. I added a WebService to the Website because later on the WebService will

subscribe to a Provider(Feed) of News, Sports and Weather and things like that. So when a Linkbutton

on the Default.aspx page is clicked it will connect to the link in the WebService which will load the News,

Sports or Weather onto the Default.aspx web page.

The problem is I can't get the LinkButton to execute the Link in the WebService. The link will call the page up

to where you see all of the Web References. But then if you want to execute one of those references you

have to click its link and the Invoke button that will follow. My questioh is how can the link on my Default.aspx

page execute the link in the WebService. Now I changed the LinkButton into an <a href> but I still can't execute

the link in the WebServices. I always use www.Microsoft.com as the link when testing and I wasn't sure about the return type

so I put "void" for an HTTPRequest, so below is the link from the Default.aspx web page and below that is he asmx file:

[code]....

View 2 Replies

C# - Will Static Public Variables In App Get Shared With Other Users In The Same App

Nov 11, 2010

For reasons I would rather not discuss, I need to create a custom authentication system for my app. I was just reviewing the system and am having some doubts if my solution is thread safe. My goal was to create a solution that would allow my app to authenticate a user one time and that users authentication info would be shared by all master pages, pages, classes, user controls, etc that are used. (But not share the same info between users) Here is my setup: PageHttpModule.cs - this is added to the web.config as a httpModule.

public class PageHttpModule : IHttpModule
{
public void Init(HttpApplication app)
{
app.AuthenticateRequest += new EventHandler(OnAuthenticateRequest);
}
public void OnAuthenticateRequest(Object s, EventArgs e)
{
CurrentUser.Initialize();
}
public void Dispose() { }
}
CurrentUser.cs
public static class CurrentUser
{
public static bool IsAuthenticated { get; private set; }
public static string Email {get; set;}
public static string RealName {get; set;
public static string UserId {get; set;}
public static void Initialize()
{
CurrentUser.AuthenticateUser();
}
Note: this is a scaled down version of my authentication code.
public static void AuthenticateUser()
{
UserAuthentication user = new UserAuthentication();
user.AuthenticateUser();
if (user.IsAuthenticated)
{
CurrentUser.IsAuthenticated = true;
CurrentUser.UserId = user.UserId;
CurrentUser.Email = user.Email;
CurrentUser.RealName = user.RealName;
}
}
}
UserAuthentication.cs
public class UserAuthentication
{
public string Email { get; set; }
public string RealName { get; set; }
public string UserId { get; set; }
public bool IsAuthenticated { get; private set; }
public UserAuthentication()
{
IsAuthenticated = false;
Email = String.Empty;
RealName = String.Empty;
UserId = String.Empty;
}
public void AuthenticateUser()
{
//do some logic here.. if the user is ok then
IsAuthenticated = true
Email = address from db
UserId = userid from db;
Realname = name from db;
}
}

I have tested between 3 different browsers and it seems to work fine, but I am still learning and don't want to make a huge mistake. If my logic is totally wrong, then how should I do it so I dont have to put user lookups on every page directly?

View 4 Replies

C# - Can Use HashTable For Temporary Data Storage After Reading Data From Database

Feb 5, 2010

I am looking for opinions and best coding practices.I need to get info from a database with a query such as SELECT this, that FROM MyDB (returning 2 fields). Would it be wrong to use a hashtable for temporary storage?Is there a better way to accomplish the same thing? What about if I am returning more than 2 fields, would it be best to step up to a DataSet or something?

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
GetData();
[code]...

View 7 Replies

Forms Data Controls :: How To Populate Hashtable Data Into GridView

Mar 10, 2011

L server into one datatable inside DBLayer.I want to return this table as Hashtable inside BLL, and I want to show the result inside GridView inside Presentation Layer.

View 2 Replies

WCF / ASMX :: PHP Webservice?

Apr 24, 2010

I am using PHP web service in dot net [URL]I set the name of web service as Test but when I am trying to access object test I was not able to use that, is there is any other method to use PHP webservice.

View 1 Replies

Use A WCF Or An ASMX Webservice?

Jul 9, 2010

I was looking for an asp.net webservice that uses .net 4.0 but everytime I choose 4.0 the webservice choice goes away.Someone suggested to me that maybe they(MS) want you to use WCF instead. I don't know much about it but he said they are like webservices but better. So anyone got a comparisons guide?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved