I've double checked that the names for everything are correct, but I just can't seem to get this to work.

Any help you can give me would be greatly appreciated.

Thanks!
--Lisa

Source: http://www.livejournal.com/community/aspdotnet/32521.html

  • Generating HTTP Errors in IIS

    Date: 04/13/05     Keywords: asp, web

    I'm working on developing custom error pages for a client of ours, and I'm working on trying to have the various errors point to different ASP pages that have scripts that email out to tech support that an error occurred on the website. Obviously the only way (that I know of) to test these error pages is to regenerate the errors. Producing a 404 error is easy, but how would I go about reproducing a 503 (Server Unavailable) error or a 500 (Internal Server Error) error? Also, the way I currently have it set up is that the error pages are all in my /Scripts folder and I was wondering if there was a way to be able to grab the site that the person was trying to go to. So for example someone tries to go to www.fake.com/as9daijoi which doesn't exist. The custom error page comes up, and sends out an email to tech support saying that they were TRYING to navigate to www.fake.com/as9daijoi but couldn't. I have it grabbing their IP address, the time, and any referring pages that there were. Any help would greatly be appreciated.

    This is on IIS 5.1 with WinXP SP2, developing in InterDev and using AspMail 4.0 for email.

    Source: http://www.livejournal.com/community/aspdotnet/32005.html

  • HELP PLEASE!!!!

    Date: 04/08/05     Keywords: database, asp, sql, microsoft

    Hello peoples, I am having a bitta trouble with my code and can't seem to find an answer. Im currently running XP Pro with SP2, IIS 5.1, and try to do a simple DSNless SQL Update from a form connecting to a Access 2000 database. The ASP code is as follows.

    <% 
    	Dim strDataPath, objConnection
    	strDataPath = Server.MapPath("rest.mdb")
    	Set objConnection = Server.CreateObject("ADODB.Connection")
    	strConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;"_
    	+ " Data Source= " & strDataPath & ";"
    	objConnection.ConnectionTimeout = 15
    	objConnection.CommandTimeout = 10
    	objConnection.Mode = 3
    	
    	if objConnection.State = 0 then
    	objConnection.Open strConnectString
    	end if
    			
    	Dim strSQL, objRS
    			
    	strSQL = "SELECT * FROM food"
    	Set objRS = Server.CreateObject("ADODB.RecordSet")
    	objRS.Open strSQL, objConnection,3,3
    	objRS.AddNew
    	objRS("tableno") = Request.Form("tableno")
    	tableno = Request.Form("tableno")
    	objRS("people") = Request.Form("people")
    	people = Request.Form("people")				
    	objRS.Update
    
    	Set objRS = Nothing
    	objConnection.Close
    	Set objConnection = Nothing
    			
    	Response.Redirect("placeorder2.asp?tableno=") + tableno + "&people=" + people
    		
    %>
    


    This is the error I get.

    Error Type:
    Microsoft JET Database Engine (0x80040E09)
    Cannot update. Database or object is read-only.
    /rest/placeorder1-1.asp, line 20

    What am I doing wrong?

    Source: http://www.livejournal.com/community/aspdotnet/31731.html

  • Safari is sucking the life out of me

    Date: 04/06/05     Keywords: browser, asp, java, web

    I'm having a problem that I hope someone may be able to help with.
    I have some .NET and Javascript code that works in IE, NN, Moz, and Opera BUT it is not working in Safari.


    I have a webform called Input.aspx

    The Input.aspx.vb page in Page_Load has these two lines:
    btnSubmit.Attributes.Add("onClick", "javascript: return Validate(event, this);")
    GetPostBackEventReference(Page)

    The Input.aspx page has a button btnSubmit and some Javascript
    In the javascript I am using a flag called "problem"
    When problem is true I return false from the event which stops the further propagation of the btnSubmit's click.
    When problem is false I
    a. hide a span that encloses btnSubmit
    b. show a span that says, "Processing...Please Wait"
    c. return true

    This works in IE, NN, Mozilla, and Opera.
    The problem is Safari.
    In Safari, it performs a, b, and c, but the btnSubmit Server Side Click event doesn't happen.

    So, I thought, okay I'll just call __doPostBack right after step b. The problem with that is that the Server Side Click happens twice then in IE, NN, etc.

    I can't figure out what the hell Safari is doing (or not doing, really) with the __doPostBack?

    Here is the Javascript in Input.aspx
    //some validating stuff
    //assume that at this point problem is either "true" or "false"
    function Validate(e,r)
    {
    if (problem == "true") // problem, cancel event
    {
    return false;
    e.returnValue = false;
    }
    else // no problem, continue
    {
    // hide button, show processing gif, continue postback
    lbutton.style.display = "none";
    lprocessing.style.display = "inline";
    return true;
    e.returnValue = true;
    }
    }


    All browsers (including Safari) are performing Validate upon btnSubmit onClick event.
    All browsers except Safari are continuing on with the Server Side Click event of btnSubmit after returning from the function Validate().

    Any ideas why Safari just stops?

    Source: http://www.livejournal.com/community/aspdotnet/31454.html

  • user controls...

    Date: 04/06/05     Keywords: no keywords

    I have a user control that is a link button. I want this to be on every page in my app. When I click the link button, I want to run a function that will return to me a dataset. Let's say this function looks for every line of code that starts with "Dim". I want it to do this for the current page only.

    How can I get my user control to call this function for only the page the user is on when they click on my user control? I've got the name of the current page already. Is there a way to switch over to that page with my code... and just read all of the code on the page??

    Source: http://www.livejournal.com/community/aspdotnet/31012.html

  • Server Error in '/' Application.

    Date: 04/05/05     Keywords: browser, asp, security, web

    I am new to asp.net and i recently bought some new webspace.

    when i uploaded the directories from my computer to my webspace they stopped working and i kept getting this error:

    "Server Error in '/' Application."

    now strangly enough if i upload all of the data without it's own folder into the main directory of my webspace then it works...how would i be able to get it to work by uploading each project in it's own directory?

    this is the description of the error:

    "Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

    Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off"."

    I've changed the web.config file in the way in which the error page told me to and i'm still getting the same message.

    what's going wrong here then? (I'm still quite new to all of this).

    Source: http://www.livejournal.com/community/aspdotnet/30825.html

  • My expertise lies elsewhere

    Date: 04/05/05     Keywords: asp, jsp, web

    Hey everybody, '[info]'julisana again.

    I'm running into a little snag with webforms. I'm a bit more experienced in this area using JSP, as I actually know what the proper command for it is. But anyway. I'm looking for the command/class in C# that would be comporable to the request.getParameter(); function available in JSP (It's used to get form parameters that are submitted across multiple pages using sessions.

    But, what I'm trying to do is not exactly that. I've got a web form that has a function attached to the submit button. I'd like that function to be able to pull all the values off of the form and stick them into a session to be retrieved on the next page, and I'm not quite sure how to do it in ASP.NET using C#.

    Any help you can give me would be greatly appreciated.

    Many Thanks!
    --Lisa

    P.S. if this is a little disjointed, I apologize. I'm running on a poor night's sleep and not functioning quite normally.

    Source: http://www.livejournal.com/community/aspdotnet/30663.html

  • Hey

    Date: 04/01/05     Keywords: web

    Hey everybody. I'm a little new to the C# development, but I'm trying to muddle my way through it for a project I was asked to create (online exams that submit to the instructor via e-mail).

    So I was wondering...

    I'm trying to use the System.Web.Mail namespace to creat the message that will be submitted, but I've run into a bit of a snag. I'm wondering if it's possible to use this, if the SMTP server is not going to be the same for each person who takes the test.

    Again, I'm quite new to C# and I ask that you go easy on me. ^_^

    Cheers!
    --Lisa

    X-posted to '[info]'csharp

    Source: http://www.livejournal.com/community/aspdotnet/30454.html

  • web setup project

    Date: 03/30/05     Keywords: web

    Hello,
    I am trying to build a .msi installer using a web setup project. The dependency checking is causing me major headaches because some of my references have different versions of the same .dll listed as a dependency. Does anyone know of a way to turn off this automatic dependency check?

    Thanks

    Source: http://www.livejournal.com/community/aspdotnet/30034.html

  • No IIS

    Date: 03/27/05     Keywords: html, asp, java, security, web, microsoft

    I want to develop the following site over the next few days: http://www.damn-them.com/

    The problem that I face is that I have installed a copy of Windows XP Home edition and there is no IIS. Considering that I cannot view (let alone compile) any ASP.Net code the DotNet IDE without IIS, I cannot develop the above site on my current operating system. I wish that I could find an ASP.Net compiler online. As the development of Damn-Them is embryonic, either a VB.Net or C# ASP.Net compiler would suffice. If I do not resolve this problem quickly then I am going to trot to the pub. There is no chance that I will perform any reinstallation.

    I found a possible solution (below). However, I do not have those files that it asks for:


    General HOWTO for running IIS in Windows XP Home Edition.


    by Richard Sandoz - Certified Java Programmer


    (1) locate and edit the file C:\WINDOWS\INF\SYSOC.INF


    (2) locate a section called [Components]


    (3) find a line like this:
    iis=iis.dll,OcEntry,iis.inf,hi­de,7


    (4) change it to this (the iis cab in the i386 xp home folder looks to
    be nothing)
    iis=iis2.dll,OcEntry,iis2.inf,­,7


    (some sort of ms caching thing keeps sticking back iis.dll when I try
    to nuke it. quickly renaming and making hidden dir called iis.dll
    seems to thwart, but not worth it, so iis2.dll is good enough)


    (5) I grabbed the iis.dl_ and iis.in_ from win2k advanced server cd.


    I would guess similar techniques would work from W98, FP, etc.
    Use "EXPAND IIS.DL_ IIS2.DLL" from a command prompt
    Same for IIS2.INF, place IIS2.INF in C:\WINDOWS\INF and IIS2.DLL in
    C:\WINDOWS\SYSTEM32\SETUP


    (6) Now when I did "add windows programs" from the control panel's add
    new programs,


    I had IIS options and I could even check em off. yippee - could not
    check em off from my xppro cd :(((


    I just went with the defaulted ones though (all i needed was iis web
    server)


    (7) It will prompt you for files. Get em from MS XP Home CDs, Adv
    Server CDs, C:\WINNT\SYSTEM32\INETSRV, C:\WINDOWS\I386, etc. (It will
    tell you the file it needs, you just need to have a searcher going,
    probably the CDs will have all you need)


    (8) You can get to your IIS from Control Panel's Administrative
    Programs.
    I stuck in an index.html file and reconfigure IIS to work like this.
    No go :(((
    I right clicked on my inetpub folder and did something with shared
    folders. No go :(((
    I looked at the event viewer and saw the error of my ways.
    Go to IIS and goto Directory Security tab and click Edit button and
    Browse for the user setup on my laptop.


    (9) Yippee, hello world from http://localhost


    I won't support this solution unless paid to. I am an out of work
    developer looking for work.


    I bought a Toshiba 5005 laptop which came with XP home.
    I then bought Win XP Professional.
    I have bunches of CDs from when I was a MSDN subscriber.
    From a general search on the internet I found contradictions.


    Microsoft says you need professional XP to do IIS period.
    q310090 was yanked from their site which had the "workaround" for
    this.


    When I tried to setup XP upgrade to pro, my laptop rebooted and hung
    on an xp logo with an animated graphic.
    I have verified this to be the case with others as well. Upgrading to
    xp pro isn't an option for this laptop.

    Source: http://www.livejournal.com/community/aspdotnet/29843.html

  • Defining constants only once (C# v SQL)

    Date: 03/24/05     Keywords: database, asp

    I'm about to start a new ASP.NET project and one thing I'd like to find is a way to do is automate the export of static constants to a text file. The text will ultimately be used when building the database tables and stored procs. The goal here is to make sure constants get defined in only one place. For example letus say I have a set of classes like

    public class FilterTypes {
      public enum Categories { cero, uno, dos, tres, quatro };
    }
    
    public class UserModes {
      public static readonly int mask1 = 1;
      public static readonly int mask2 = 2;
      public static readonly int mask3 = 4;
      public static readonly int mask4 = 8;
    }
    
    public sealed MyKingdomForAClassName {
      private static int _hidden = 13;
    
      static public int Hidden {
       get { return _hidden; }
      }
    }
    I when I finish a build I'd like to have a text file that would look something like this:
    Test1.Data.FilterTypes.mask1 = 1 
    Test1.Data.UserModes.mask2 = 2 
    Test1.Data.UserModes.mask3 = 4 
    Test1.Data.UserModes.mask4 = 8 
    Test1.Data.MyKingdomForAClassName.Hidden = 13 
    Test1.Data.FilterTypes.Categories.cero = 0 
    Test1.Data.FilterTypes.Categories.uno = 1 
    Test1.Data.FilterTypes.Categories.dos = 2 
    Test1.Data.FilterTypes.Categories.tres = 3 
    Test1.Data.FilterTypes.Categories.quatro = 4
    I've managed to write some methods that using IReflection to get these values. But the question is what is the best way to call all these at the end of the build. Or is there a better way to approach this. Anybody have any experience centralizing constants definitions in .NET?

    Source: http://www.livejournal.com/community/aspdotnet/29556.html

    1. helloooo and a question.

      Date: 06/21/05     Keywords: database, asp

      I'm relatively new to asp.net, but am picking stuff up quickly, so am happy!.

      Well here's my question, and hopefully someone can help.
      What I want to do is:

      1.Upload an Excel file (xls).(Example inventory list) and then
      2.Save that in an Access database and
      3.Have that displayed on another page, in tables.
      So instead of the usual reading straight off database tables, I need to be able to read off an excel file, that an user will upload , save that to Access, and display content back to a new page.


      Any help would be appreciated!.

      thank ya:d

      Source: http://www.livejournal.com/community/aspdotnet/35506.html

    2. Considering moving to ASP.Net 2005 Beta 2?

      Date: 06/12/05     Keywords: html, asp

      Anyone considering moving to ASP.Net 2005 Beta 2 may want to read this: http://www.damn-them.com/it/2005/06/transition-to-aspnet-2005-beta-2.html

      (Cross Posted)

      Source: http://www.livejournal.com/community/aspdotnet/35226.html

    3. .Net Framework 2 host

      Date: 06/05/05     Keywords: no keywords

      Anyone know of any .Net Framework 2 hosts?

      Source: http://www.livejournal.com/community/aspdotnet/34981.html

    4. round and round we go

      Date: 06/03/05     Keywords: no keywords

      an interesting thing that i noted while working on an app the other day.. i had to round up some currency to the nearest nickel and found some peculiar thing with .NET's Math.Round.. it wasn't exactly doing the same sort of arithmetic rounding that we learn as kids (with an upwards bias), where you would round up if the trailing digit is >=5 and round down if the trailing digit is <5. i ended up writing my own customized rounding function using a variant of an assymetric arithmetic rounding algorithm that rounds up to the nearest 0.05.

      so, after some poking around and research, it seems like .NET is using an algorithm called Banker's rounding.. which at 5, it rounds to the nearest even number. pretty sleazy, imo. :) anyway, point being, if you're working on some currency related app, you may want to note the subtle yet possibly drastic possible arithmetic inaccuracy ala. the movie "office space" if you're not privy to the type of rounding algorithm a particular language is using.

      here's a good article if you're interested in looking into the types of rounding algos. available and used.
      http://support.microsoft.com/?kbid=196652

      xposted in my journal and '[info]'csharp

      Source: http://www.livejournal.com/community/aspdotnet/34746.html

    5. LEFT function ntext data type

      Date: 05/20/05     Keywords: sql

      Hello everyone,

      I know that you cannot do the following if columnName is ntext datatype:

      SELECT LEFT(columnName, 400)

      Is there another way to achieve the same effect in the SQL query itself?

      Source: http://www.livejournal.com/community/aspdotnet/34515.html

    6. Sending data across servers

      Date: 05/17/05     Keywords: asp, security

      I have an encrypted token that I would like to send from one server to another.
      I create the encrypted token, and when I try to pass it to another server, it says access denied. I have checked all security settings imaginable, added the aspnet account, gave it full control, etc.

      I have this working for an asp project.
      The only catch I can think of is on my receiveToken page, I am not using server-side code. I am decrypting the token with vbscript on the .aspx page, and do not even have a code-behind page specified. However it is failing before it runs any of my script so I doubt this would be affecting it... I am not sure.

      Any suggestions on why I am not being granted access would be much appreciated.
      Thanks.

      Source: http://www.livejournal.com/community/aspdotnet/34238.html

    7. Date sort?

      Date: 05/10/05     Keywords: no keywords

      Anyone here got some good code for sorting dates?

      Source: http://www.livejournal.com/community/aspdotnet/33687.html

    8. asp tables and postbacks

      Date: 05/09/05     Keywords: asp

      I seem to have forgotten that when using dynamically loaded asp tables, on the postback all your table data goes away. Any recommendations for the best way to preserve state of a table on the postback?

      Source: http://www.livejournal.com/community/aspdotnet/33436.html

    9. AxoSoft OnTime defect tracker.

      Date: 04/27/05     Keywords: database, sql, web, tracker

      AxoSoft OnTime defect tracker

      I thought I'd bring this nifty app to your attention. I'll start by saying that I'm not affilated with AxoSoft, I just happened upon their site one afternoon and found that they offer their bug tracking tool free of charge for single-user installations. They basically offer a Windows client, Web client and VS.NET client and database backend to a well featured bug and new feature tracking tool. It utilises a SQL Server database, so you'll need either a version of MSDE or SQL Server Personal Edition but obviously they're availble free of charge too.

      After you've installed it, you can get a product key from the site to unlock the tool(s) you've installed indefinitely. I realise that outside of a team environment lone Developers often find it unnecessary to use such a tool, but I've found it to be pretty useful since installing it. So, I suppose YMMV :)

      Source: http://www.livejournal.com/community/aspdotnet/32809.html

    10. ListBox and DropDownList...ack!

      Date: 04/25/05     Keywords: asp


      Never mind. I forgot about putting the onClick="editClearButton_Click" command in my button code.


      Okay, so this is a really dumb question. Seriously. I should know this.

      I *do* know this.

      But it still doesn't work.

      I've basically got the equivilant of two forms on one page. It's all contained in one form, but each button handles a certain set of controls. Hence the phrasing.

      Each control set has a submit button and a clear button. (I'm trying to get the clear buttons working first, as those are less messy) The first clear button has a ListBox control, and the second clear button has a DropDownList control.

      Each of these controls deals with indicies (indexes? Whatever's plural for index) for selection purposes. So, as one might expect, I want to set the index to the default (the defaults each read "--Please select an exam--" and "--Please select a course--" respectively). Unfortunately, when I reset the SelectedIndex property to the default, nothing happens.


      Script Code Sample (using C#):
      void editClearButton_Click(object sender, EventArgs e)
      {
        editExamAlert.Text = "";
        editExamValidation.Text = "";
        editExamList.SelectedIndex = 0;
      }




      ASP.NET Code Sample:
      

    Edit an Exam

    Please Select the exam you would like to edit.
    --Please Select an Exam-- nu210 Exam 1 nu220 Exam 1 nu235 Exam 1 nu238 Exam 1
    Previous page  ||  Next page


    antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home