|
Hi,
i need to ask every hour a online database if some data has expired.
The database is a Ms Sql Server at the Provider Webspace.
How could this be solved?
Could i use a WebService? But how to start the trigger?
Must there be a Daemon written? But how to install this at the Provider?
Any Suggestion would be greate.
Thanks
:k:
|
|
|
|
|
I usually solve these kinds of problems by creating a simple console or winforms application and use the Windows Task Scheduler to schedule it for execution.
|
|
|
|
|
Thank you for your reply.
But the Server is at the Provider, and i don't have a local machine that is running all the time. Also a WinService is not a Solution cause the Server is also running for foreign Domains and the Provider won't let me customize his System...
|
|
|
|
|
You can either develop a WinForm or Console Application and put it on Windows Scheduler or develop a SSIS Package and schedule it in the database task.
|
|
|
|
|
Thank you for your reply.
The SSIS Package sounds good, i will have a look at this.
|
|
|
|
|
Great, Go Ahead
|
|
|
|
|
you could use a webpage that auto refreshes every hour - downside is you have to have a computer on with this page open in a browser. Alternatively, you could create a basic app in java/c++ etc and have it request the page every hour(thus running the polling script).
|
|
|
|
|
Hi All,
In my web application i am getting this error:
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
In web.config i used pages validateRequest="false" enableEventValidation="false" viewStateEncryptionMode ="Never"
inside the <system.web>tag.
please tell me how to sortout this issue. I am using framework 2.0.
Thanks and Regards:
|
|
|
|
|
Re-install .Net Framework and try once.
|
|
|
|
|
i have been re install the framework but getting the same problem.
|
|
|
|
|
Dear friends,
I want to post article in the WML section.
But when I go to start a new article, on
selecting WAP/WML there comes no subsection.
Again without subsection I cann't post my
article. I'm pretty confused about the situ-
ation.Please help me to find out the problem.
Md.Farhan Asif
Capisoft Commiunication ltd.
Motijheel,Dhaka.
this is Normal
|
|
|
|
|
|
I went to the msdn website:http://msdn.microsoft.com/en-us/library/system.net.networkinformation.aspx
looking for help writing the code in VB.
|
|
|
|
|
Do you have any concrete question or problem while implementing your method?
|
|
|
|
|
I have a selection in my ASP page (please see codes):
1. I would like the fisrt time it will show the defaut selection the picture on the right-side (select of "0"), but when the web-user change any other, then the picture will be refresh accordingly
2. If #1 can't be used (can't recognize seclection changed), can we add a button or tag "REFRESH PICTURE" so that the web-user can select to refresh after changing the selection?
3. If #2 also can't be done ... is there other way to refresh the picture without jumping to another page?
Thanks to any help
*) I insert Request("Picture"), just in case I have to use a mean to jump back the same page & get the new selection!
<body>
<%
Dim str_image, request_select
request_select = Request("Picture")
If request_select = "0" Then
str_image = "image/Picture0.jpg"
ElseIf request_select = "1" Then
str_image = "image/Picture1.jpg"
ElseIf request_select = "2" Then
str_image = "image/Picture2.jpg"
Else
str_image = "image/Picture3.jpg"
End If
%>
<table id='outtertable'>
<form action="NextPage.asp" method="post" name="myForm" >
<tr>
<td>
<table id='datatable'>
<tr>
<td>Select picture</span></td>
<td>
<select name="Picture" size="1" id="Picture">
<option value="0" >Picture 0 </option>
<option value="1" >Picture 1 </option>
<option value="2" >Picture 2 </option>
<option value="3" >Picture 3 </option>
</select>
</td>
</tr>
</table>
</td>
<td>
<table id='buttontable'>
<tr>
<td><img src =<%=str_image%> width="100" height="100"> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td><input type="submit" value="Next Page"></td>
</tr>
</form>
</table>
</body>
|
|
|
|
|
You can use a javascript timer to force your page to refresh itself. Or you can use AJAX to make a call to request a new URL to show in the img tag.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
- With the timer: I will have other problems. My example codes are only partial of the web-user entries, if I use the Timer to refresh the page ... means all web-users are typing are lost (or I have to save all present entries before refresh). Also if I want to update as the web-user selecting the new picture, that means the refresh should be within 1 second --> the sreen will keep refreshing constantly, it is not very good!
- I have never used the AJAX, your guide looks close to the:
function poptastic(url)
{
newwindow=window.open(url,'name','height=500,width=600');
if (window.focus) {newwindow.focus()}
return false;
}
If it is true, then I still have the problem that I must know the new web-user picture selection in the same page & refresh the old with the new one at the same spot ... which I don't know how to get it without to jump to the new page to use the Request("Picture")
Any further help?
|
|
|
|
|
function changeImage() {
var img = document.getElementById('img');
var foo = new Date;
img.src = "a.jpg"+ foo.getTime();
}
|
|
|
|
|
Might be I not uderstand well ... did you mean:
When web-user click on the Image link, then it will invoke the script (changeImage) & show the desired image (a.jpg)?
If yes, then I have the problem: With your codes, I must know which picture I have to show first! My problem is that I have to wait someone change the selection (the same page) & I don't know how to read the new selection without jumping to a new page
Might be I understand in-correctly?
|
|
|
|
|
For this to work you would use your script to save whatever picture you wanted as "a.jpg". adding the time after the filename ensures you do not end up with a cached version of the image.
Fix:
This line:
img.src = "a.jpg"+ foo.getTime();
should be:
img.src = "a.jpg?"+ foo.getTime();
|
|
|
|
|
Sorry about my understanding, as I mentioned before ... I don't know which picture to place as you mentioned! I must somehow knowing the web-user select the new one in the SELECT tag to replace new picture on right-side at the same place (please see my original codes)!
And I still don't have the way to acknowledge the change of the SELECT tag within the same page, by any chance you modify my codes & it works as you mention?
Many thanks for be patient with me
|
|
|
|
|
Ah.
Javascript to get selected index of a select tag:
<script>
var dropdown = document.getElementById("mySelectElement");
var index = dropdown.selectedIndex;
if (index == 0){
alert("a");
} else if (index == 1){
alert("b");
}
</script>
Then in your html:
<select id="mySelectElement">
<option>a</option>
<option>b</option>
</select>
|
|
|
|
|
Hi Marc,
Thanks for the codes, I am able to get the SELECT tag now & I will try to replace the old picture with the new picture as other suggestions
|
|
|
|
|
I have made a Silverlight application which use a WCF webservice. I works fine but there is a small problem.
The background:
I run a gameserver and the game saves a resultfile which is updated in an interval (can be set).
I have a webpage with a Silverlight app. The SL app uses webservice to update some data on the client, with an automatic update every 20 seconds or so. Also works fine.
The Webservice parse the file from the game and that's no problem.
But I realize that if, let's say, 50 ppl go to the page and just watch the SL app update, the webservice parses the file 50 times every 20 seconds! Not good...
Here is how I want it to go:
The client calls the webservice and gets the already parsed file as data. And the parsing/reading the file will update in the background and store the data to be ready for transfer to the client.
But how do I make my webservice parse the file without the client calling the service?
I actually don't know how to pass this problem... not an webservice expert either
Any tips and was I clear enough?
|
|
|
|
|
We have a similar issue where we have a large block of data that displays on a dashboard. It can be accessed by 1..N clients and involves some complex queries and therefore we don't want to be re-running it each time the request is made.
The solution is to cache on the server side.
There are several ways to tackle this. I would start by abstracting your service with an interface (should be doing this already) and then having the interface also receive a cache interface, ICache.
You can make it simple, for example, perhaps you construct it with a factory like this:
ICache cache = CacheFactory.RetrieveCache(TimeSpan lifespan);
This gives you flexibility for how long it is cached.
Then, you might use the ASP.NET Web Cache - take a look here for some exhaustive examples/solutions:
Exploring Caching in ASP.NET[^]
Another option is to use the Singleton pattern and create a static class with a "lastcached" date and the parsed file.
Basically, you expose a method "getparsedfile" and the method checks the lastcached. If it was cached less than you interval, it will simply return the cached object, otherwise it locks the object, updates the date and then re-parses the file.
Hope that makes sense!
|
|
|
|