Showing posts with label security. Show all posts
Showing posts with label security. Show all posts

Thursday, March 29, 2012

Server Side Time Out in c#

Hi

I have an ASP.NET site that uses web services for security. I have two
servers running the same service. Provided the servers are running I am
able to run a check script and swap servers depending on whether the
service is running properly. This works fine if just IIS has fallen
over.

The problem is that if the server is switched off, the ASP.NET code
continues to search for the server and leaves the application hanging.

Is is possible to add a timeout to the server-side code, so that after
say 5 seconds it stops searching for the server and uses the
alternative one?

Thanks

JaredI found a way to get round this. The web service has a Timeout already,
you just need to set it. I am not sure if every type of object has a
Timeout setting.

e.g.
WebService1.Security entsec = new WebService1.Security();

entsec.Timeput = 1000;
string entsecCheck = entsec.CommsCheck([password]);

This will time out after 1 second if the server is turned off.

Jared

Jared wrote:

Quote:

Originally Posted by

Hi
>
I have an ASP.NET site that uses web services for security. I have two
servers running the same service. Provided the servers are running I am
able to run a check script and swap servers depending on whether the
service is running properly. This works fine if just IIS has fallen
over.
>
The problem is that if the server is switched off, the ASP.NET code
continues to search for the server and leaves the application hanging.
>
Is is possible to add a timeout to the server-side code, so that after
say 5 seconds it stops searching for the server and uses the
alternative one?
>
Thanks
>
Jared

Server Side Time Out in c#

Hi
I have an ASP.NET site that uses web services for security. I have two
servers running the same service. Provided the servers are running I am
able to run a check script and swap servers depending on whether the
service is running properly. This works fine if just IIS has fallen
over.
The problem is that if the server is switched off, the ASP.NET code
continues to search for the server and leaves the application hanging.
Is is possible to add a timeout to the server-side code, so that after
say 5 seconds it stops searching for the server and uses the
alternative one?
Thanks
JaredI found a way to get round this. The web service has a Timeout already,
you just need to set it. I am not sure if every type of object has a
Timeout setting.
e.g.
WebService1.Security entsec = new WebService1.Security();
entsec.Timeput = 1000;
string entsecCheck = entsec.CommsCheck([password]);
This will time out after 1 second if the server is turned off.
Jared
Jared wrote:
> Hi
> I have an ASP.NET site that uses web services for security. I have two
> servers running the same service. Provided the servers are running I am
> able to run a check script and swap servers depending on whether the
> service is running properly. This works fine if just IIS has fallen
> over.
> The problem is that if the server is switched off, the ASP.NET code
> continues to search for the server and leaves the application hanging.
> Is is possible to add a timeout to the server-side code, so that after
> say 5 seconds it stops searching for the server and uses the
> alternative one?
> Thanks
> Jared

Monday, March 26, 2012

Server space allocation and security question

Hi for those who can help me...
I am dutch and try to use my best English. I do not know if thi is the
right group to asked my question. I am bussy with makeing a wensite where
people can upload there stufff and other people could see what they are
sharing pictures documents etc... etc... But the thing i wanted to do is
that everyone who makes a account could upload it to the server and they can
only access the server by the website. The site is going to be build in
asp.net and sql-server and all the things ineed 2 do the business.
My question(s) is.
Everyone who registered at the website can get there own space allocation
for about 10mb they can change delete and upload data to there directory
1. How can i make the above that nobody could change there things or files
without knowing the login id's and passwords.
2. Where do i have 2 look to configure this. Are there examples on the web
and where
3. is this a setting in IIS or Windows 2003 Server or just Windows XP
Proffesional
Thanx in advance
My best regards
Mike"mike" <me2u@.writeme.com> wrote in message news:40a4959a$0$146$3a628fcd@.reader1.nntp.hccnet
.nl...
> Hi for those who can help me...
> I am dutch and try to use my best English. I do not know if thi is the
> right group to asked my question. I am bussy with makeing a wensite where
> people can upload there stufff and other people could see what they are
> sharing pictures documents etc... etc... But the thing i wanted to do is
> that everyone who makes a account could upload it to the server and they c
an
> only access the server by the website. The site is going to be build in
> asp.net and sql-server and all the things ineed 2 do the business.
Just a friendly remark: when you admit your english isn't too good,
don't use "cute" shortcuts ("2" instead of "to"), as this will make your tex
t
more difficult to read (there are a lot of "non-english" people here!)

> My question(s) is.
> Everyone who registered at the website can get there own space allocation
> for about 10mb they can change delete and upload data to there directory
> 1. How can i make the above that nobody could change there things or files
> without knowing the login id's and passwords.
> 2. Where do i have 2 look to configure this. Are there examples on the web
> and where
> 3. is this a setting in IIS or Windows 2003 Server or just Windows XP
> Proffesional
> Thanx in advance
> My best regards
>
> Mike
>
What you can do (one solution, I'm sure there are more) is store the uploade
d
files in the sql-server database. That way *you* (or rather the application)
can control access to specific "files". If you store the size of every uploa
ded
file, you can check the total amount stored and reject the upload if it's ov
er
the limit.
Hans Kesting

Server space allocation and security question

Hi for those who can help me...

I am dutch and try to use my best English. I do not know if thi is the
right group to asked my question. I am bussy with makeing a wensite where
people can upload there stufff and other people could see what they are
sharing pictures documents etc... etc... But the thing i wanted to do is
that everyone who makes a account could upload it to the server and they can
only access the server by the website. The site is going to be build in
asp.net and sql-server and all the things ineed 2 do the business.

My question(s) is.

Everyone who registered at the website can get there own space allocation
for about 10mb they can change delete and upload data to there directory

1. How can i make the above that nobody could change there things or files
without knowing the login id's and passwords.
2. Where do i have 2 look to configure this. Are there examples on the web
and where
3. is this a setting in IIS or Windows 2003 Server or just Windows XP
Proffesional

Thanx in advance

My best regards

Mike"mike" <me2u@.writeme.com> wrote in message news:40a4959a$0$146$3a628fcd@.reader1.nntp.hccnet.n l...
> Hi for those who can help me...
> I am dutch and try to use my best English. I do not know if thi is the
> right group to asked my question. I am bussy with makeing a wensite where
> people can upload there stufff and other people could see what they are
> sharing pictures documents etc... etc... But the thing i wanted to do is
> that everyone who makes a account could upload it to the server and they can
> only access the server by the website. The site is going to be build in
> asp.net and sql-server and all the things ineed 2 do the business.

Just a friendly remark: when you admit your english isn't too good,
don't use "cute" shortcuts ("2" instead of "to"), as this will make your text
more difficult to read (there are a lot of "non-english" people here!)

> My question(s) is.
> Everyone who registered at the website can get there own space allocation
> for about 10mb they can change delete and upload data to there directory
> 1. How can i make the above that nobody could change there things or files
> without knowing the login id's and passwords.
> 2. Where do i have 2 look to configure this. Are there examples on the web
> and where
> 3. is this a setting in IIS or Windows 2003 Server or just Windows XP
> Proffesional
> Thanx in advance
> My best regards
>
> Mike

What you can do (one solution, I'm sure there are more) is store the uploaded
files in the sql-server database. That way *you* (or rather the application)
can control access to specific "files". If you store the size of every uploaded
file, you can check the total amount stored and reject the upload if it's over
the limit.

Hans Kesting