That would definitely be, Iron Maiden - The Clairvoyant
Kasic Slobodan
Posts
-
the last song -
How to open 17012 port on Windows 2008 Server?I am having a trouble opening port 17012 on Windows 2008 Server. I need to allow incoming traffic and I have added exception in Windows firewall for both UDP and TCP, but port remain time outed. I have also visited Windows Firewall with Advanced Security and tried to open it, but still no luck. I also Googled for the answer, but nothing works. No extra firewalls no AV's except Windows Defender... Does anyone know the solution for this?
-
RenderContents - Adding items after rendering...First of all, I want to apologize for stupid title. Don't have any idea how to form it well. Second, I have to work on custom data grid for project. Stored procedure sometimes return one table, and sometime more then one. I've started the project, but I faced the problem on the beginning. I want to be able to add items to that grid like you can add items to ListView in windows forms which will give me more control. (Without Java Script, only ASP.NET) On RenderContents I have a code that render table header and footer so that table can be displayed in DesignMode (WebControl). I've also created a void that takes one argument. String (which is the actual data to be added) and then generate tr's and td's and save them in some variable. That variable is appended in RenderContents void (between header and footer part), but when I run it, table gets rendered, but the generated data is rendered outside the table. The question is, can I achieve this kind of functionality and how?
-
Anoying add-in, context menu, problem...I am developing a add-in and I've planned to write an article about it, but I am facing VERY annoying problem that I can't figure out. I've loaded up virtual machine to test a real time behavior of the add-in and notice this problem. When I am run add-in (F5) from it's project, context menu items adds to the menu of the code window and aspx context CommandBars. After I build a setup (containing .dll, .addin file and adding proper value in registry) and opening a project, add-ins main window loads, but context menus don't. I have two folders in the installation folder. One is for VS 2005 and other for VS 2008. First time, I was testing with only one folder (for VS 2005) and context menu items was working. Further on, I've added second folder to the setup project, build it and send to to virtual machine for testing. Context menus didn't show up. Ever since then I was unable to get them work. I also though that setup is building with wrong .dll, but I am pretty sure that's not the case. To exclude that possibility, I've manually added .dll file to the install folder. Add-ins main window works on both Visual Studios. Please help! This is driving me crazy!!! And sorry if I was confusing...
-
CollectionBase trouble...Your article helped. Thank you.
-
CollectionBase trouble...I've downloaded some sample project and I found that contains code of how to implement adding items from design mode (CollectionBase). I've started to implement that into my test project I was working on and created a property like.
public MenuItemCollection MenuItems
{
get { return items; }
}When I go to design mode and add user control, in property grid, of that user control, I have MenuItems, but it doesn't open a dialog letting me to add the items. It acts like a string :confused:. To check whether I am crazy or not, I've added bool property to see will this work fine and display as a dropdown with true and false. That did worked, so now I am puzzled. I've searched on the net with no luck. I don't see any differences between that sample project and mine except that I use UserControl (partial class), but then again, why shouldn't properties work with partial classes as well (they worked with bool property) so now I am asking you for help. Thanks.
-
Session state created while response flushed....Session state has created a session id, but cannot save it because the response was already flushed by the application.
I have a big problem with this error. Few days ago, web app worked fine and when session expired and I refreshed the page, code inside Session_Start in global.asax logs me in again.
cookie = Request.Cookies\["Userword"\]; if (cookie != null) { string strCookie = cookie.Value; if (strCookie != "") { sin.AutoLogin(cookie.Values\["heavy"\], cookie.Values\["metal"\], true, Request.UrlReferrer.AbsoluteUri == null ? "" : Request.UrlReferrer.AbsoluteUri, false); } } else { if (Session\["UserInfo"\] == null) { Response.Redirect("login.aspx"); } }
Yesterday I can't login by refreshing the page, any more. If I login manually, everything is ok. Error raises only when session expires and user refreshes the page. When I try to step in AutoLogin function, try catch block catches the Object reference error before debugger was able to step into a function. The above error I caught in Application_Error in global.asax. I have searched the net for solution, but with no luck. Most of the answers were that you shouldn't use Response.Flush and I have Response.Flush only in captcha class which is loaded on login.aspx page and everything worked great until yesterday. Can anyone help me with this issue?
-
StatusCode not working properly.I did take a look, but this post is written today :). I was few days ago on your blog :). Anyway, thank you for your help.
-
StatusCode not working properly.Thank for your reply, but could you give me any example how can I do this? I don't quite understand how can I simulate 500 internal server error with HttpHandler? On the other hand, I do use HttpHandler for captcha. Sorry for late reply. I had some issues with logging on Code Project.
-
StatusCode not working properly.Me again. I have a strange problem with StatusCode. I want to simulate a '500 Internal Server Error' by setting Response.StatusCode equal to 500, but it doesn't seem to work. I've turned on trace, page renders properly, but the Status code in trace is 500. I even turned on custom errors in web.config, but Response.Status = 500 doesn't make ASP to redirect to a page inside web.config, but when I misspelled a URL, ASP redirects me to a 404 error page. Can anyone tell me how to simulate page status like that error really happened? Thank you so much!
-
Storing class into sessionYes. I was doing outside the events. Thank you for your reply and your time. If I asked later, I would save some time figuring out what went wrong :). And thank you Navaneeth for a tip about casting. Best regards and thanks both of you.
-
Storing class into sessionI changed a way of storing user information from many session to one session object with storing a class into that session. I have a class like:
public class UserInfo { // Inside this class there are properties to store users data (all properties are public) string _username; int _id; bool _somePermission; ... and so on }
When user logs in and if user have all necessary permissions, I create a new instance of a UserInfo class
UserInfo user = new UserInfo();
And then read user permissions, from database, for every page on a site and store it in each property that correspond to
user.Username = dataReader["username"]; user.ID = dataReader["id"]; user.SomePermission = dataReader["some_permission"];
And finally, store that class into session like
Session.Add("UserInfo", user);
On every page, where I need information from session, I do
UserInfo user = (UserInfo)Session["UserInfo"];
And then use
user.Username, user.ID or user.SomePermission
But, theres something wrong about it. When I try to compile it, I get an error (marking Session)
An object reference is required for the nonstatic field, method, or property 'System.Web.UI.Page.Session.get'
I am missing something, thats for sure, but I don't know what. Anyone would help me with this? Thanks in advanced.
-
Object reference not set and session issue...I've added check if connection is opened, but unfortunately, I have to wait to see if error comes again :), but I definitely have to change some things in my code. Your session property sounds great. I have to implement that. Thank you Christian and best regards.
-
Object reference not set and session issue...I am sorry for stupid title, but I don't know how to name the thread. Anyway, I am working on a web admin panel and I have a problem about object reference. I know what this error mean, but what I don't know is why I reload some page 1000 times and I try to reload it 1001 time, and I get object reference? Sometimes is on if (dataReader.Read()) and sometimes on if ((bool)Session["SomeText"]). Can session be abandoned this way? Before this if's, I have another if (in session_start in global.asax) that verifies whether session is null or not. Does anyone have an idea what could be a problem?
-
Why CodeProject keeps logs me off from time to time?Thanks. Helped me too.
-
Why CodeProject keeps logs me off from time to time?Few days ago, I've noticed that I am not logged in and I login (I never sign out). Time passes and here I come to CP again, status - logged off. Now I was watching new articles and noticed that I am logged off, so I login, load another article and puff, logged off again. Logged back again in order to write this post and I was logged off when I click on General Discussion forum. What's happening? Or my firefox is on drugs :)?
-
We're 8!Happy birthday Code Project. I wish you all the best, and keep up the good work in the future to come ;).
-
Strange comma in Request.FormI didn't knew that and yes, your right. There are two controls with same name, I just checked. Thank you for solving the mystery ;).
-
Strange comma in Request.FormI have JS function that displays the div container with appropriate userControl for manipulating users permitions. JS funtion:
function ConvertProfessional(id)
{
document.getElementById("userId").value = id;
document.getElementById("adminPermition").style.display = '';
document.getElementById("adminEdit").style.display = 'none';
}It's a table with a bunch of the check boxes and a hidden field where would be stored user id for that particular user. When I click on a link, JS function gets called and displays the div and sets the user id in the hidden field. Hidden field:
<input id="userId" type="hidden" name="userId" />
Then I click on a submit button and with Request.Form["userId"] get that user id. The problem i on the picture. http://img132.imageshack.us/img132/9104/reqds0.jpg[^] Somehow, out of nowhere, comma appears :omg::wtf: I put alert(id) in the JS function and it displays proper value. I also checked with firebug when the page is rendered, and still proper value. This is how I get the value of hidden field and any other control as well. Nothing gremlin in here :).
string uid = Request.Form["userId"];
I don't know what is going on, but since everything is going on, I workaround a problem with this:
uid = uid.Remove(uid.IndexOf(','));
Pretty comfortable :-D.
-
Event not firingDebugger says that, when I click on submit button, Page.IsPostBack is false?! Hows that possible? I even add a new button, and tried with it and same thing.