Search Results

Search found 15797 results on 632 pages for 'session variables'.

Page 54/632 | < Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >

  • How to tell the Session to throw the error query[NHibernate]?

    - by xandy
    I made a test class against the repository methods shown below: public void AddFile<TFileType>(TFileType FileToAdd) where TFileType : File { try { _session.Save(FileToAdd); _session.Flush(); } catch (Exception e) { if (e.InnerException.Message.Contains("Violation of UNIQUE KEY")) throw new ArgumentException("Unique Name must be unique"); else throw e; } } public void RemoveFile(File FileToRemove) { _session.Delete(FileToRemove); _session.Flush(); } And the test class: try { Data.File crashFile = new Data.File(); crashFile.UniqueName = "NonUniqueFileNameTest"; crashFile.Extension = ".abc"; repo.AddFile(crashFile); Assert.Fail(); } catch (Exception e) { Assert.IsInstanceOfType(e, typeof(ArgumentException)); } // Clean up the file Data.File removeFile = repo.GetFiles().Where(f => f.UniqueName == "NonUniqueFileNameTest").FirstOrDefault(); repo.RemoveFile(removeFile); The test fails. When I step in to trace the problem, I found out that when I do the _session.flush() right after _session.delete(), it throws the exception, and if I look at the sql it does, it is actually submitting a "INSERT INTO" statement, which is exactly the sql that cause UNIQUE CONSTRAINT error. I tried to encapsulate both in transaction but still same problem happens. Anyone know the reason?

    Read the article

  • SSH Public Key Authentication only works if active session exists before

    - by Webx10
    I have a rather strange problem with my SSH configuration. I set up my server with the help of a Remote Access Card and configured everything with a KVM viewer. So while being logged into the server via the KVM Viewer I configured SSH with only pubkey and tried to login from my local laptop. It worked fine. If I quit the KVM Session (or logout with the user in the KVM session) I cannot login via ssh anymore (pubkey denied). SSH login only works as long as the user is somewhere still logged in. Any hints what the problem might be? Console output for a failed login (all personal data exchanged): OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011 debug1: Reading configuration data /Users/mylocaluser/.ssh/config debug1: Reading configuration data /etc/ssh_config debug1: /etc/ssh_config line 20: Applying options for * debug1: /etc/ssh_config line 103: Applying options for * debug1: Connecting to 100.100.100.100 [100.100.100.100] port 12345. debug1: Connection established. debug1: identity file /Users/mylocaluser/.ssh/id_rsa type 1 debug1: identity file /Users/mylocaluser/.ssh/id_rsa-cert type -1 debug1: identity file /Users/mylocaluser/.ssh/id_dsa type -1 debug1: identity file /Users/mylocaluser/.ssh/id_dsa-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.2 debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 pat OpenSSH* debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr [email protected] none debug1: kex: client->server aes128-ctr [email protected] none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug1: Server host key: RSA ab:12:23:34:45:56:67:78:89:90:12:23:34:45:56:67 debug1: Host '[100.100.100.100]:12345' is known and matches the RSA host key. debug1: Found key in /Users/mylocaluser/.ssh/known_hosts:36 debug1: ssh_rsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Offering RSA public key: /Users/mylocaluser/.ssh/id_rsa debug1: Authentications that can continue: publickey debug1: Offering RSA public key: /Users/mylocaluser/.ssh/id_rsa2 debug1: Authentications that can continue: publickey debug1: Trying private key: /Users/mylocaluser/.ssh/id_dsa debug1: No more authentication methods to try. Permission denied (publickey). Console output for a successfull login (only possible while "active session" exists): OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011 debug1: Reading configuration data /Users/mylocaluser/.ssh/config debug1: Reading configuration data /etc/ssh_config debug1: /etc/ssh_config line 20: Applying options for * debug1: /etc/ssh_config line 103: Applying options for * debug1: Connecting to 100.100.100.100 [100.100.100.100] port 12345. debug1: Connection established. debug1: identity file /Users/mylocaluser/.ssh/id_rsa type 1 debug1: identity file /Users/mylocaluser/.ssh/id_rsa-cert type -1 debug1: identity file /Users/mylocaluser/.ssh/id_dsa type -1 debug1: identity file /Users/mylocaluser/.ssh/id_dsa-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.2 debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 pat OpenSSH* debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr [email protected] none debug1: kex: client->server aes128-ctr [email protected] none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug1: Server host key: RSA ab:12:23:34:45:56:67:78:89:90:12:23:34:45:56:67 debug1: Host '[100.100.100.100]:12345' is known and matches the RSA host key. debug1: Found key in /Users/mylocaluser/.ssh/known_hosts:36 debug1: ssh_rsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Offering RSA public key: /Users/mylocaluser/.ssh/id_rsa debug1: Server accepts key: pkalg ssh-rsa blen 279 debug1: Authentication succeeded (publickey). Authenticated to 100.100.100.100 ([100.100.100.100]:12345). debug1: channel 0: new [client-session] debug1: Requesting [email protected] debug1: Entering interactive session. debug1: Sending environment. debug1: Sending env LANG = de_DE.UTF-8 Welcome to Ubuntu 14.04.1 LTS

    Read the article

  • Unable to make the session state request to the session state server.

    - by Angry_IT_Guru
    For about 4-5 months now, I seem to be having this sporadic issue--mainly during our busiest time of the day between 10:30-11:45AM, where all my Windows 2003 web servers in a Microsoft NLB cluster start throwing session state server errors. A sample error is below. System.Web.HttpException: Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the client and server ports are the same. If the server is on a remote machine, please ensure that it accepts remote requests by checking the value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection. If the server is on the local machine, and if the before mentioned registry value does not exist or is set to 0, then the state server connection string must use either 'localhost' or '127.0.0.1' as the server name. at System.Web.SessionState.OutOfProcSessionStateStore.MakeRequest(StateProtocolVerb verb, String id, StateProtocolExclusive exclusiveAccess, Int32 extraFlags, Int32 timeout, Int32 lockCookie, Byte[] buf, Int32 cb, Int32 networkTimeout, SessionNDMakeRequestResults& results) at System.Web.SessionState.OutOfProcSessionStateStore.SetAndReleaseItemExclusive(HttpContext context, String id, SessionStateStoreData item, Object lockId, Boolean newItem) at System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) Now I'm using ASP.NET State service on a centralized back-end Windows 2003 server that all servers communicate to. I was originally using SQL Server state for a couple years as well prior to having this issue. The problem with SQL wqas that when the issue occurred, it created a blocking situation which essentially impacted all users across all servers. The product company recommended that I use the standard ASP.NET State service as that was what they technically supported. Why this would make a difference is beyond me -- but I had no choice but to try it! I have attempted to create multiple application pools, adding additional servers, chaning TCP/IP timeout from 20 to 30 seconds, and even calling Microsoft ASP.NET product support, with very little success. I even recommended that they review whether they are using read-only session state instead of read/write per page request -- as I understand that this basically causes every page to make round-trips to state server even if state isn't being used on the page. Unfortunately, the application is developed by our product company and they insist that it is something with my environment because other clients do not have these sort of issues. However, I've talked to other clients and they tell me when they've seen issues like they, they've basically had to create another web farm. This issue almost seems like I've simply reached some architectural limit within the application... Microsoft's position on the issue is that the session state needs to be reduced and the returncode being reported back from the state server indicates buffers are full. To better understand the scope of issues (rather than wait for customers to call and complain), I installed ELMAH and configured it to send me e-mails when unhandled exceptions occur. I basically get 500-1000 e-mails during the time period of high activity! If any one has any other ideas I could try or better ways to troubleshoot, I'd appreciate it.

    Read the article

  • Is it possible to keep nm-applet running between invocations of WM startup?

    - by serverninja
    I am using nm-applet to interface with NetworkManager, running xmonad as a window manager. My X sessions (including nm-applet) are set up with a /usr/local/bin/xmonad.start script. My question is, how can I keep nm-applet running in the background as long as X is running, but not necessarily xmonad? As mentioned above, it is being started with xmonad (and dying with it when xmonad is restarted, etc). I am using gdm to manage my X sessions, and I'm running 10.10. Where's a good place to start nm-applet to suit my particular needs? I need to remove it from the control of xmonad, but don't know where to start it otherwise. Any help, tips, etc appreciated. Edit: problem seems to be with how I have integrated xmonad. I have the session script as a file in /usr/share/xsessions/xmonad.desktop with the following contents: [Desktop Entry] Encoding=UTF-8 Name=XMonad Comment=Lightweight tiling window manager Exec=/usr/local/bin/xmonad.start Icon=xmonad.png Type=XSession /usr/local/bin/xmonad.start contains the following: #!/bin/bash xrdb -merge ~/.Xresources xcompmgr -c & trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --width 8 --heighttype pixel --height 18 --transparent true --alpha 0 --tint 0x000000 & gnome-settings-daemon & gnome-screensaver & if [ -x /usr/bin/nm-applet ] ; then nm-applet --sm-disable & fi /usr/bin/urxvtd -q -o -f & eval `ssh-agent` & if [ -x /usr/bin/gnome-power-manager ] ; then sleep 1 gnome-power-manager & fi /usr/bin/gnome-volume-control-applet & exec xmonad The question is how do I integrate xmonad, gdm, X, etc in such a manner to replicate the behavior I currently have except with nm-applet (and possibly other programs) running whether or not xmonad is?

    Read the article

  • Remote server's x menus without vino, vnc etc

    - by Fredde
    A question where both google searches, as well as askubuntu and ubuntu forums searches fails though rephrasing the question a number of times. Have a Lubuntu server with some storage and functions and a lubuntu laptop. Previous when running winXP, I had Xming, could start a x-session on the server, got the lxpanel on the laptop, switching, running x-programs without a hitch though the lxpanel menu. A very neat and convenient solution. However the winXP crashed, me moving to lubuntu also for the laptop. still things work, I ssh into the server and can start x-programs without a hitch. But, as with all graphical desktops, I at times need access to the lx menus on the server to find programs and here the problems arise, most finding I got talk about installing VNC, vino etc overkills, avoiding existing X-integration between the servers. I'll like to do as I did with Xming, see the menu system on the server, in my "client's" xwin? Just to see the servers installed software without colliding with the laptop X-server, just using it as normal X-apps.

    Read the article

  • How to prevent Network Manager from auto creating network connection profiles with "available to everyone" by default

    - by airtonix
    We have several laptops at work which use Ubuntu 11.10 64bit. I have our Wifi Access Point requiring WPA2-EAP Authentication (backed by a LDAP server). I have the staff using these laptops when doing presentations by using the Guest Account. So by default when you have a wifi card, network manager will display available Wireless Access Points. So the logical course of action for a Novice(tm) user is to single left click the easy to use option in the Network Manager drop down list... At this point the Staff Member (who is logged in with the guest account) expects to just be able to connect and enter any authentication details if required. But because they are using the Guest account, they won't ever have admin permissions (nor do I want them to), and so PolKit kicks in with a request for admin authorisation. I solved this part by modifying the PolKit permissions required to allow all users to create System Network Connections... However, because these Staff members are logging onto the Wifi Access Point with Ldap Credentials and because the Network Manager is now saving those credentials as a System Connection, their password is available for the next guest user session (because system connection profiles are stored in /etc/NetworkManager/system-connections.d/* ). It creates system connections by default because "Available to all users" is ticked by default when you quickly connect to a new wifi access point. I want Network Manager to not tick this by default. This way I can revert the changes I made to Polkit and users network connection profiles will be purged when they log out.

    Read the article

  • Can't Log Into Ubuntu 12.04

    - by Razick
    Yesterday, after turning on Ubuntu, I logged into a Gnome session. A few minutes later, I tried switching to Unity for a change. Unfortunately, the background and my desktop icons loaded, but the system bar and launcher failed to load even after several minutes. Unity had always worked fine for me. I then tried the guest account, and it worked fine on both Unity and Gnome. However, the problem with my account got worse; I couldn't log into any desktop at all anymore. I would type in my password and press enter and it would just sit there doing nothing. The computer no longer responded in any way, so I had to hold the power button and reboot. The same problem happened repeatedly. Earlier today, I tried to get on again. I found that I hadthe same problem, when I tried to log in, the computer no longer locked up, but instead flashed a black screen with theconsole output and what seemed to be an error message before returning to the log in screen. It was to quick for me to read, about 1/4-1/2 second. I'd really appreciate some help as I have some important files that are not backed up yet. I can't transfer the files to a new account, or even make a new account because I tried taking the password off my account so now I can't authenticate from the guest to perform root functions. I'd really appreciate some help as I have some important files that are not backed up yet. Thanks.

    Read the article

  • Windows 7 PATH not expanding

    - by trinithis
    I am using the following to create and edit environment variables for Windows 7. Control Panel\All Control Panel Items\System -> Advanced system settings -> Environment Variables Under System variables I have the following pertinant variables: PROG32=C:\Program Files (x86) REALDWG_SDK_DIR=%PROG32%\Autodesk\RealDWG 2011 Path=%REALDWG_SDK_DIR%;%PROG32%\Haskell\bin However, the following happens: C:\>echo %PROG32% C:\Program Files (x86) C:\>echo %Path% %REALDWG_SDK_DIR%;C:\Program Files (x86)\Haskell\bin Is it possible to have a chain of variables expand? If I rename Path to something else, I sometimes get the problem, and sometimes I don't.

    Read the article

  • Sharing a session between vBulletin forum and status.net microblogging platform

    - by jaz
    Hello, I need to integrate vBulletin 4.0.3 Publishing Suite with status.net microblogging platform. The first thing I need to do is make these 2 to share 1 session so a user logged in vBulletin forums will also be logged in to status.net and vice versa. I have installed different vBulletin components under different subdomains: forums.sample.com - vBulletin forums blogs.sample.com - vBulletin blogs sample.com - vBulletin content management All of these point to the same place (.../public_html/index.php) which includes the respective php file (content.php for sample.com | blog.php for blogs.sample.com | forum.php for forums.sample.com) depending on the $_SERVER['HTTP_HOST'] I have configured vBulletin to use a single cookie.domain (.sample.com) for all of these 3 domains so visiting different domains doesn't break the session. I also have status.sample.com, which is the subdomain where status.net is installed. The subdomain configuration is different so the document_root is actually a subfolder (.../public_html/status/) in sample.com Now, can you please give me some pointers on how to make all these subdomains share a single session? I'm not sure if it helps, but as I understand, status.net does no custom session handling by default, but it is possible to turn it on so it will start storing session data in a database table called "session". Any tips will be appreciated. Thank you.

    Read the article

  • How to find if an Oracle APEX session is expired

    - by Mathieu Longtin
    I have created a single-sign-on system for our Oracle APEX applications, roughly based on this tutorial: http://www.oracle.com/technology/oramag/oracle/09-may/o39security.html The only difference is that my master SSO login is in Perl, rather than another APEX app. It sets an SSO cookie, and the app can check if it's valid with a database procedure. I have noticed that when I arrive in the morning, the whole system doesn't work. I reload a page from the APEX app, it then sends me to the SSO page because the session was expired, I logon, and get redirected back to my original APEX app page. This usually works except first thing in the morning. It seems the APEX session is expired. In that case it seems to find the session, but then refuse to use it, and sends me back to the login page. I've tried my best to trace the problem. The "wwv_flow_custom_auth_std.is_session_valid" function returns true, so I'm assuming the session is valid. But nothing works until I remove the APEX session cookie. Then I can log back in easily. Anybody knows if there is another call that would tell me if the session is expired or not? Thanks

    Read the article

  • How to stop tcpdump remotely using expect from a new telnet session

    - by The CodeWriter
    I am trying to stop the tcpdump command from running on a remote terminal. If I telnet to the terminal, start tcpdump, and then send a ^c, tcpdump stops with no issues. However if I telnet to the same terminal, start tcpdump, and then exit the telnet session, when I reconnect to the same telnet session I am unable to stop tcpdump via a ^c. When I do this instead of stopping tcpdump it seems that it just quits the telnet session and tcpdump continues to run on the remote terminal. I provided my script below. Any help is greatly appreciated. #!/usr/local/bin/expect -f exp_internal 1 set timeout 30 spawn /bin/bash expect "] " send "telnet 192.168.62.133 10006\r" expect "Escape character is '^]'." send "\r" expect "# " set now [clock format [clock seconds] -format {%d_%b_%Y_%H%M%S}] set command "tcpdump -vv -i trf400 ip proto 89 -s 65535 -w /tmp/test_term420_${now}.pcp " send "$command\r" expect "tcpdump: listening on" # This works correctly. tcpdump quits and I am returned to the expected prompt send "\x03" expect "# " send "$command\r" expect "tcpdump: listening on" # Exit telnet session send -- "\x1d" expect "telnet> " send -- "q\r" expect "] " # Reconnect to telnet session send "telnet 192.168.62.133 10006\r" expect "Escape character is '^]'." send "\r" # This does not work as intended. The ^c quits the telnet session instead of stopping tcpdump send "\x03" expect "] " send "ls\r" expect "] "

    Read the article

  • lost session after redirect_to

    - by PeterWong
    I encountered a strange performance in my current project, which is about session. The strange part is it was normal in Safari but failed in other browsers (includes chrome, firefox and opera). There is a registration form for input of part of the key information (email, password, etc) and is submitted to an action called "create" This is the basic code of create action: @account = Account.new(params[:account]) if @account.save ApplicationController.current_account = @account session[:current_account] = ApplicationController.current_account session[:account] = ApplicationController.current_account.id email = @account.email Mailer.deliver_account_confirmation(email) flash[:type] = "success" flash[:notice] = "Successfully Created Account" redirect_to :controller => "accounts", :action => "create_step_2" else flash[:type] = "error" flash[:title] = "Oops, something wasn't right." flash[:notice] = "Mistakes are marked below in red. Please fix them and resubmit the form. Thanks." render :action => "new" end Also I created a before_filter in the application controller, which has the following code: ApplicationController.current_account = Account.find_by_id(session[:current_account].id) unless session[:current_account].blank? For Safari, there is no any problem. But for the other browsers, the session[:current_account] does not exist and so produced the following error message: RuntimeError in AccountsController#create_step_2 Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id Please could anyone help me?

    Read the article

  • Java Hibernate session delete of object

    - by user2535201
    I'm really struggling with hibernate sessions, I never have the result I expect when making a query on a modified session object. I think all my problems are related. The last one is the following : final Session iSession = AbstractDAO.getSessionFactory().openSession(); try { iSession.beginTransaction(); MyObject iObject = DAOMyObject.getInstance().get(iSession,ObjectId); iObject.setQuantity(0); //previously the quantity was different from zero DAOMyObject.getInstance().update(iSession,iObject); DAOMyObject.getInstance().deleteObjectWithZeroQuantities(iSession); iSession.getTransaction().commit(); } catch (final Exception aException) { iSession.getTransaction().rollback(); logger.error(aException.getMessage(), aException); throw aException; } finally { iSession.close(); } What I'm not getting is why the object is not deleted, since I'm modified it in the session, the query making the delete should find it. I had the same problem with creating an object with an incremental id in a session, then creating another one in the same session before the commit, with a select max(id)+1. But the session gets me the same number of id every time.

    Read the article

  • Removing open session from dvd-rw

    - by FrozenKing
    As you can see from the above image, nero is showing some "session is open" in my DVD rewritable disc. The problem is whenever I erase the session it is not getting erased and I am unable to write the remaining part of the disc. So, the worst part is will I be able to use this dvd-rw again or now it's just a waste scrap? Nero version is 11 OS win7 AV is KIS2012 Dvd-rw is from Sony company Dvd drive from samsung sh-s203b with latest firmware

    Read the article

  • How to secure a directory in Apache using a PHP session

    - by Cogsy
    I have a site that uses PHP session for authentication. There is one directory that I would like to restrict access to that does not use any PHP, it's just full of static content. I just don't know how to restrict access without every request going through a PHP script. Is there some way to have Apache check the session credentials and restrict access like Basic Auth?

    Read the article

  • SSH socks proxy tunnel without interactive session?

    - by dirtside
    I use ssh -D 1080 myhost.org ...to open up an SSH tunnel from my work machine to my home machine, so as to bypass the idiotic content filter on the corporate firewall. However this also creates an interactive SSH session that lives the whole time I'm using the tunnel. Is there any way to tell SSH just to create the tunnel and not bother with the interactive session?

    Read the article

  • how to restrict null session

    - by jack
    Hi I've changed the following things in regedit and restarted PC to restrict null session: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\LSA Value Name: RestrictAnonymous Data Type: REG_DWORD Value: 1 Value Name: RestrictAnonymousSam Data Type: REG_DWORD Value: 1 Value Name: EveryoneIncludesAnonymous Data Type: REG_DWORD Value: 0 However, I can still run and get null session. net use //IP /u:"" "" command completed successfully I've also done "Disable NetBios over TCP/IP" but it didn't help. Any ideas?

    Read the article

  • tmux session switcher now displays windows belonging to sesions

    - by Nick Barnwell
    I recently compiled tmux from source rather than going through homebrew for some reason I can no longer recall. At the same time, switching sessions via ^b sstarted to display all of the windows under each session, and not just the sessions thesmelves: Session Switcher Now Is there any way I can revert to the previous behaviour of only displaying sessions and not the windows belonging to them as well?

    Read the article

  • Google chrome crashes when you paste from a remote session

    - by oo
    I often have a remote desktop session or a java remoting tool up and whenever i copy from within a remote session and paste into chrome browser, the browser freezes and i have to kill it for anything to work again. has anyone seen this or have a resolution? i have to remember to copy and paste into notepad first and then copy from notepad and then into chrome which is a pain. I am using google chrome 5.0

    Read the article

  • DevExpress Reporting Session Issue

    - by LeeHull
    This is pretty complicated so I will explain what is going on. I have created an ASP.NET website for displaying images, the way we use our images is, we have a database table that contains the URL where the images are located, however we recently started moving them from the filesystem, and storing them directly into the database as binary, but since we don't want to break older applications, we currently store them both places till they are all updated. Alright, the website I'm working on, is just a reporting website to display images by a date range, I have created an HTTPHandler to display the image, depending if they exist in the database as binary, if the row is DBNull, I just grab the URL from the other table instead, I just read the image, convert it into a byte[] and write it to the response, so it is interpreted as an image. I have created a page to display the report using DevExpress Reporting, I just query the report, save the dataset into a session, and the report reads the session to bind the report, i also have a picturebox in the report bound to "Handler.ashx?id=ImageID", this is because I am not binding a URL to the image, since it is a byte[] Also since there could be a report with 10000+ images, I am reading the dataset from the session inside the handler and just pulling out the image from the passed in ImageID, I am doing this to prevent connecting to the database each and every row. Now the strange thing is, Report loads fine.. data is loading, I have paging on the devexpress report viewer, it is loading the images fine, however here is the issue. When I print or export, I am not getting any images, I am debugged and found out the Session.Count is 0 when it tries to print or export, which is strange since there is more than just the dataset in the session. I have also added IRequiresSessionState to allow sessions in the handler, but the session count is still 0, I have changing the Handler to an aspx page, same issue. Any ideas or suggestions on logic changes, I'm all ears.. this is a very difficult situation since I have to display the images from database as a string AND byte[] since one can be URL and other be the image bytes, but I also can't slam the database on connection calls each row either. I have also reported the issue to DevExpress and they are clueless as well, since they don't dispose the session in the exporting process.

    Read the article

  • Ongoing confusion about ivars and properties in objective C

    - by Earl Grey
    After almost 8 months being in ios programming, I am again confused about the right approach. Maybe it is not the language but some OOP principle I am confused about. I don't know.. I was trying C# a few years back. There were fields (private variables, private data in an object), there were getters and setters (methods which exposed something to the world) ,and properties which was THE exposed thing. I liked the elegance of the solution, for example there could be a class that would have a property called DailyRevenue...a float...but there was no private variable called dailyRevenue, there was only a field - an array of single transaction revenues...and the getter for DailyRevenue property calculated the revenue transparently. If somehow the internals of daily revenue calculation would change, it would not affect somebody who consumed my DailyRevenue property in any way, since he would be shielded from getter implementation. I understood that sometimes there was , and sometimes there wasn't a 1-1 relationship between fields and properties. depending on the requirements. It seemed ok in my opinion. And that properties are THE way to acces the data in object. I know the difference betweeen private, protected, and public keyword. Now lets get to objectiveC. On what factor should I base my decision about making someting only an ivar or making it as a property? Is the mental model the same as I describe above? I know that ivars are "protected" by default, not "private" asi in c#..But thats ok I think, no big deal for my presnet level of understanding the whole ios development. The point is ivars are not accesible from outside (given i don't make them public..but i won't). The thing that clouds my clear understanding is that I can have IBOutlets from ivars. Why am I seeing internal object data in the UI? *Why is it ok?* On the other hand, if I make an IBOutlet from property, and I do not make it readonly, anybody can change it. Is this ok too? Let's say I have a ParseManager object. This object would use a built in Foundation framework class called NSXMLParser. Obviously my ParseManager will utilize this nsxmlparser's capabilities but will also do some additional work. Now my question is, who should initialize this NSXMLParser object and in which way should I make a reference to it from the ParseManager object, when there is a need to parse something. A) the ParseManager -1) in its default init method (possible here ivar - or - ivar+ppty) -2) with lazyloading in getter (required a ppty here) B) Some other object - who will pass a reference to NSXMLParser object to the ParseManager object. -1) in some custom initializer (initWithParser:(NSXMLPArser *) parser) when creating the ParseManager object.. A1 - the problem is, we create a parser and waste memory while it is not yet needed. However, we can be sure that all methods that are part ot ParserManager object, can use the ivar safely, since it exists. A2 - the problem is, the nsxmlparser is exposed to outside world, although it could be read only. Would we want a parser to be exposed in some scenario? B1 - this could maybe be useful when we would want to use more types of parsers..i dont know... I understand that architectural requirements and and language is not the same. But clearly the two are in relation. How to get out of that mess of my? Please bear with me, I wasn't able to come up with a single ultimate question. And secondly, it's better to not scare me with some superadvanced newspeak that talks about some crazy internals (what the compiler does) and edge cases.

    Read the article

  • Java - Should private instance variables be accessed in constructors through getters and setters met

    - by Yatendra Goel
    I know that private instance variables are accessed through their public getters and setters method. But when I generate constructors with the help of IDE, it initializes instance variables directly instead of initializing them through their setter methods. Q1. So should I change the IDE generated code for constructors to initialize those instance variables through their setter methods. Q2. If yes, then why IDE don't generate constructors code in that way?

    Read the article

< Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >