|
Oh and as for changes between 6 & 7 - i doubt it. best thing would be to search on technet etc for "whats new IIS" or something
|
|
|
|
|
Hi everybody
how copy a file from one machine A to another machine B using asp.net 1.1 C#
|
|
|
|
|
Tons of different ways
You will need code that:
Emails it /uses ftp to transfer it / use sockets / use ajax.
if the servers are on the same netowrk (use machine name instead of "C:/"):
http://www.w3schools.com/asp/met_copyfile.asp[^]
If its a one off - use a usb key.
|
|
|
|
|
My Problem is as
I have one virtual directory hosted on our server. Now I, want only 10 users can access the virtual directory at any instance of time.
The server we are running is windows 2003, IIS 6, ASP.net 2.0
How can i restrict the access
|
|
|
|
|
Try this
void Application_Start(object sender, EventArgs e)
{
Application["ActiveSessions"] = 0;
}
void Session_Start(object sender, EventArgs e)
{
try
{
Application.Lock();
int activeSessions = (int) Application["ActiveSessions"] + 1;
int allowedSessions = 10;
Application["ActiveSessions"] = activeSessions;
if (activeSessions > allowedSessions)
System.Web.HttpContext.Current.Response.Redirect("~/UserLimitReached.aspx", false);
}
finally
{
Application.UnLock();
}
}
void Session_End(object sender, EventArgs e)
{
Application.Lock();
Application["ActiveSessions"] = (int)Application["ActiveSessions"] - 1;
Application.UnLock();
}
|
|
|
|
|
how to use drag and drop upload in IE?is there any plugin for that process?just i want to drag a file file from desktop and drop into web application instead of browse button process.its working fine for firefox and chrome with the help of DragandDropUpload1.16 plugin.but in IE it doesnt work.so what to do?
|
|
|
|
|
im not sure if that possible, but if it is, the best place to start would probably be a java applet
|
|
|
|
|
When i start debugging, it looks like it's going to work and the VS toolbars change to show the debugging toolbar options. However the cursor changes to the "busy" cursor and vista 'ghosts out' VS 2008 indicates that it's "not responding" in the title bar. The web browser never starts up and if you I it several minutes I get the following error:
"Unable to start debugging on the web server. The web server did not respond in a timely manner. This may be because another debugger is already attached to the web server."
HOWEVER, if you then immediately debug the project again following this error, sometimes it works straight away! But the first time you debug after loading Visual Studio you always get the irritating delay and error message described above.
Any ideas what might be causing this?
|
|
|
|
|
Hello,
I have a problem. How can I show a graphic element like a polygon or something like that on a panel in a web application. The Panel should include some of this graphic-elements, and is one of several items like buttons etc. of the web application.
My prefered program language for this is C# in VisualStudio 2008.
It would be very nice to get an example.
Thank's
Frank
|
|
|
|
|
draw it and use an image tag?
or do you mean 3d?
search:
Google canvas
flash
silverlight (Microsoft)
|
|
|
|
|
Good idea,
I installed Silverlight2 and it looks like it is very easy to handle graphics on it.
The canvas was exactly what I am looking for.
Frank
|
|
|
|
|
Hi....
I got a requirement its like this....
I open any document say MS word document and if i give print command from file menu it should not display print dialog box, but one user interface say one form where user can enter his username and password. if user is valid he will be allowed to print the document by clicking print button in our webform/winform....
I am bit confused and dont understand how to start with.
It's not an issue which way i go for.. i.e windows application or web application...
Please help me out, as i may loose my job if i don't get the solution.
Awaiting...
Hemant
By:
Hemant Thaker
|
|
|
|
|
Hi,
I am trying to figure out what tools I need to update a personal project.
The webpage is essentially a collage of small clickable images, that bring up information and a simple interface
The problem I have is no version of the web page uses more than 40-50 of these images but I need to keep a library of about 1000 of them. At the moment, I have them arranged in folders on the server, which is mssively space-inefficient, since each one is only 150-250 bytes long.
I want to improve my storange system.
Is there a way to extract an image (current version uses gifs because many images use transparency) from a server-side archive like a .zip file and hand them off to javascript for placement?
Is there a way to serialize the gifs, embed them in the page, then deserialize them and hand them off to javascript?
I figure I have some learning ahead of me. I'm looking for help in pointing in the right direction. I've been searching the web and just getting info overload.
Thanks in advance to all who answer.
Methane Martini,
Shaken, not stirred
|
|
|
|
|
You can optimize the images using fireworks, photoshop or similar programs. but if they really are the size you say they are - you shouldn't need to worry about that.
|
|
|
|
|
My problem is that each of my 150-250 byte files are taking up 32K. I can zip up my page resources into a MB or two but I take up 50-60MB on server.
Methane Martini,
Shaken, not stirred
|
|
|
|
|
You are still going to run into problems because even if you zip them - you will need space on the server to unzip them using server-side code. As far as i know, JavaScript has no access to the local machine therefore you couldn't even use the temporary files on a users machine to unzip in. My suggestion, get a bigger server - if your host really is costing you so much that you are running into problems (over such a little amount of disk space) I suggest looking around for another host. Hosting is cheap as chips now and transferring host could well be worth while. 60MB is peanuts even on the cheapest packages nowadays. Most hosts give 1GB as a minimum package.
Good hosts:
1and1
uk2
|
|
|
|
|
i wanna ask a question regarding this random image link/sequential image link display issue..i have write out the code and it works, but the problem for me is i dunno how to make the image stop when mouseover the image display..
these are my code, you can test it with ur html and put 3 images with the name specified below....
var interval = 5; // delay between rotating images (in seconds)
var random_display = 0; // 0 = no, 1 = yes
interval *= 1000;
var image_index = 0;
var image1 = new imageItem("fheader18.png", "http://imdavidlee.com");
var image2 = new imageItem("fheader19.png", "http://limpek.com");
var image3 = new imageItem("davidlogo.jpg", "http://codebasic.net");
image_list = new Array();
image_list[image_index++] = image1;
image_list[image_index++] = image2;
image_list[image_index++] = image3;
var number_of_image = image_list.length;
function imageItem(image_location, link) {
this.image_item = new Image();
this.image_item.src = image_location;
this.image_item.link = link;
}
function stopImage() {
setTimeout("rotateImage()", NULL);
}
function getNextImage() {
if (random_display) {
image_index = Math.floor(Math.random() * image_list.length);
}
else {
image_index = (image_index+1) % number_of_image;
}
var new_image = image_list[image_index];
return(new_image);
}
function rotateImage(rImage, link) {
var new_image = getNextImage();
document.getElementById('rImage').src = new_image.image_item.src;
document.getElementById('rLink').href = new_image.image_item.link;
setTimeout("rotateImage()", interval);
}
http://codebasic.net
|
|
|
|
|
you could use onmouseover and onmouseout to assign a value to a variable ie.
<img onmouseover="stopplaying()" onmouseout="startplaying()" />
<script>
var isstopped=0;
function stopplaying(){
isstopped=1;
}
function startplaying(){
isstopped=0;
}
function rotateImage(rImage, link) {
var new_image = getNextImage();
if(isstopped == 1){
document.getElementById('rImage').src = new_image.image_item.src;
document.getElementById('rLink').href = new_image.image_item.link;
setTimeout("rotateImage()", interval);
}
.....
}
</script>
|
|
|
|
|
I'm putting together a small site for a photographer, and she would like a menu/thumbnail set of photo categories inside of a photo-film style border. I'm very new to the graphics etc. side of these things, so, any advice on my course of work will be appreciated. My first option is to use a background image for each table cell, centering the cell in the image, so only the image borders are visible, giving the appearance of images with film-style borders. This is not efficient, but there aren't many images in the table, so simplicity may win here. My next option is to extract component images and build only the vertical and horizontal parts of the film-style border that are visible around the images. Are there any other options?
|
|
|
|
|
Yes, use one outer div with a set width & a background image that is your film with repeat style set to repeat-y (vertically). Set the internal padding and give the thumbnail images a bottom margin correctly then you can add an unlimited amount of pictures to it. Then whenever you add an image, all you will need to do is make sure they are the right size. No farting around with adding film borders.
This would take longer to set up but is easier to manage afterwards. So, it really does depend how much you are planning to use it.
|
|
|
|
|
Hi, I'm trying to use JavaScript to log key strokes into a log.txt file, or something similar to that. Can anyone steer me in the right direction?
Thanks
|
|
|
|
|
you can not write to client machine using javascript. You can use other technologies such as ActiveX to write to client machines, but they need explicit permission of the user.
|
|
|
|
|
Nikyoro wrote: I'm trying to use JavaScript to log key strokes into a log.txt file
where you want to save the log i.e. on server or client machine.
If client machine, then you need to use ActivX and need client permissions(As Yusuf said)
If server, then use the AJAX to send request and save the strokes in the file
|
|
|
|
|
Hi,
You can use javascript _doPostBack function to forcefully postback and let code-behind do the writing part to the log file. But this may not be a best practice.
Either you love IT or leave IT...
|
|
|
|
|
Hi,
What is the goal of having the alt property in the image tag? When I hover over the image in IE7 then the text displays, in Firefox it does not display. Why is this? And what is a replacement for it?
Regards
|
|
|
|