|
msell0150 wrote: Can somebody please explain how we can access the application attributes in client code?
You question need for more clarity. What do you mean by Application Attributes ? What kind of attributes you want to access from client code ?
Please give proper explanation so that we can help you in better way.
Thank you !
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
In the BitKoo Keystone application you are able to define Roles, Functional Abilities, Secured Entities and also Attributes per Application. My question is how do you access the attributes associated with a given application via the keystone API?
There is a custom Keystone ASP.Net Membership provider defined, is it possible to access the application attributes via the Membership Profile Properties or by any other method?
|
|
|
|
|
Why not ask the vendor, they are most likely to know.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
I am currently trying to make a stock scanner similar to the one in:
http://screen.morningstar.com/screener_etf/etf_screener_version1.aspx
However, I couldn't figure out how to create the middle part where all currently selected criteria are listed (with sliders). Ideally, the mechanism should allow a new criteria row to be added, along with the slider controls and textboxes, each time a user click on the "Add criteria" or "Add category" button. Is this created with a placeholder function, a listview, a panel, or a table?
Could you please give me some ideas how the middle region could be designed? Thanks!
|
|
|
|
|
I can see the middle part is designed wonderfully using CSS and Div's.
Just you need to place the divs absolute positioned and height based on the data to display the chart like figure.
Other than that, if you place appropriate CSS it is not a big deal to add textboxes and interact with this.
But one thing is for sure, you need a strong grip on Javascript and CSS to design such a thing.
|
|
|
|
|
As Abhishek suggested you can create it using DIV and CSS. Or Even you can create one server side custom control for it. Add textboxes and other dynamic control on the click on "Add Criteria" or "Add Category" button.
As you need to do handling with dynamic control, please be careful regarding creation of control as well as the maintain of viewstate.
Good luck !
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Wow...that really seems way out of my ability at the moment, as I have minimal experience on javascript.
Can I probably produce the same result with Placeholder control and dynamically add controls to it in code behind?
In any case thanks for the help!
|
|
|
|
|
I am running a web service, which provides some updated quotes every 2 minutes. It takes quotes from a quote server.
I expected this service to establish a single connection to the quote server.
But few times I have notices that this web service establishes more than one connection to the Server.
I think that the updateManager.Start() method is called more than one time. But how that could happen? Whether the
Application State object is destroyed because of timeout or any internal error? I have a Destructor in UpdateManager Class. Will that be called automatically or I have to call it explicitly? If so how?
I welcome your advise and comments.
public class Service : System.Web.Services.WebService
{
UpdateManager updateManager;
string key = "update";
public Service()
{
if (Application[key] != null)
{
updateManager = (UpdateManager)Application[key];
}
else
{
updateManager = new UpdateManager();
Application[key] = updateManager;
updateManager.Start();
}
}
[WebMethod(Description = "Get the Current Quote")]
public string GetUpdate()
{
return updateManager.GetUpdate();
}
}
|
|
|
|
|
If you are putting the same object in application, I think there shouldnt be any problem.
The code looks fine to create one object only which could handle as many session as you want.
The only possibility of getting more than one connection is if, a client Requests for GetUpdate and its request is placed just before the Application object is set.
I mean, Client 1 requests GetUpdate, which finds that UpdateManager is missing in Application, Meanwhile client 2 makes a request. Client 2 also finds updateManager missing as it is not set to the application object yet.
Thus it starts creating another updateManager.
The possibility is there for everytime the updateManager object is recreated.
|
|
|
|
|
Abhishek Sur wrote: The code looks fine to create one object only which could handle as many session as you want.
No it doesn't. It looks horrible in fact.
Best wishes,
Navaneeth
|
|
|
|
|
Thank you for your comments.
I am sure that no clients are connected when the application starts up. And I dont want to implement Application.Lock() because I dont want the clients to wait and also the clients will not modify the updateManagerObject in the Application State.
I tested the UpdateManager class with Windows Forms and found that the Receiver Thread in UpdateManager class(Which downloads data from the Server) is orphaned sometimes. I simulated the same in the Web Service Also.
[WebMethod(Description = "Get the Current Quote")]
public string GetUpdate()
{
updateManager = new UpdateManager();
Application[key] = cache;
updateManager.Start();
return updateManager.GetUpdate();
}
This happens whenever the updateManager is re-initialized without destroying the old object. If the previous object is destroyed properly (by calling Dispose method) then everything works fine and no orphan Threads.
As you can see from the Web Service Constructor, the updateManager object is initialized when that object is null. Other wise it takes from the Application Object.
My question is How an object which is initialized and Stored in Application object becomes null? Since it becomes null the UpdateManager Constructor is called once again. How can I cal the Dispose() method?
I have no way to find the orphan threads, to destroy them.
Please suggest me some solutions.
|
|
|
|
|
As far as I know, Application object is reinitialized only if :
ASP.NET source is modified, which makes the ASP.NET to recompile,
# Adding, modifying, or deleting assemblies from the application's Bin folder
# Adding, modifying, or deleting localization resources from the <code>App_GlobalResources</code> or <code>App_LocalResources</code> folders
# Adding, modifying, or deleting the application's Global.asax file.
# Adding, modifying, or deleting source code files in the <code>App_Code</code> directory.
# Adding, modifying, or deleting Profile configuration.
# Adding, modifying, or deleting Web service references in the <code>App_WebReferences</code> directory.
# Adding, modifying, or deleting the application's Web.config file.
Check this :
http://msdn.microsoft.com/en-us/library/ms178473.aspx[^]
|
|
|
|
|
Problem here is thread safety. Your code is not thread safe and that is the reason for all weird results. Take look at Application.Lock() and Application.UnLock() methods. These methods are designed to provide thread safety when accessing/writing values into application object.
Having said that, I don't think keeping a single instance of connection in application variable is a good idea. Open the TCP connection each time and closing when done would be ideal solution. If you think it has more overhead, then store it in cache rather than keeping in application state.
Best wishes,
Navaneeth
|
|
|
|
|
What is CSS XSS?
And how can i change port through asp.net script?
|
|
|
|
|
Hi,
Cross site scripting is used to do attacks on sites (user information) that rely on vulnerable code. For a more detailed description take a look at wikipedia:
http://en.wikipedia.org/wiki/Cross-Site_Scripting[^]
Which port do you want to change and more important why? This is not what the user expects so you shouldn't do this.
Regards
Sebastian
|
|
|
|
|
Why i want to change port is becoz my ftp port no. is 21 and my submission form is also use that port. which is vulnerable to attack. thats why i want it change.
|
|
|
|
|
|
Hi,
We are building an ASP.NET website using C#.NET language and VSTS 2008.
Would you please let me know which are all the third-party tools those can help us in the complete SDLC of this project?
Thank you..
Regards,
Karina.
|
|
|
|
|
Well, there are thousand of tools helping you to do the best within your development cycle. I suggest you to specify your question more in detail, e.g. I need a tool to do automated unit-tests.
Regards
Sebastian
|
|
|
|
|
Karina.R wrote: Would you please let me know which are all the third-party tools those can help us in the complete SDLC of this project?
What kind of tool you are looking for ? Are you talking about any project Tracking tool ?
BTW : How does this related with ASP.NET ? You should ask it on General Discussion Forum.
Thank you !
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hi,
We are designing an ASP.NET website. The client asked us to have the website with Web 2.0 features.
Would you please provide any good reference material links to achieve this Web 2.0?
I need one more clarification please. That is.. May I know out of JQuery / Prototype / Other which one is the latest JavaScript framework that designers are using in designing websites?
Thank you..
Regards,
Karina.
|
|
|
|
|
|
|
Hi,
I cteated dynamic item templated in gridviw. I wat to validate from javascript . like
Col1 - col2 - Col3
50 - 60 - 40
Here i want to validate the col2 shold not leads Col1 if it so i shold produce pop up from client side...
Can any one help me...
regards
sekannak
kannak
|
|
|
|
|
Place the data in data controls within columns and place compare validators to validate the data between the two controls. Use an error summary control and set the prompt type as message box.
|
|
|
|