|
so what would be the best way to create a console application that I could schedule to run each night to send the payload.
|
|
|
|
|
In that case, you probably want to write a windows service.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Would you be able to point me in a direction to a sample of a service on how to do this or could I take bits and pieces from the examples I posted about in my first post. Again thanks for the direction
|
|
|
|
|
Sure - plenty of information on services here[^]
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
You can either make a service, or just a console application that you run from the scheduler.
I would suggest that you start with a console application in the test phase. It's a simpler form of application, it's easier to start, and you can easily display output.
---
single minded; short sighted; long gone;
|
|
|
|
|
I need to customize the createuserwizard control to allow additional fields to be inserted into the database (first name, last name, city, state, etc).
I know how I can insert these new fields into a new, separate table however it just makes more sense to insert them into the aspnet_Membership table with the rest of the default fields.
Is this possible or do I have to create a new table (which I personally think is just bad database management and something microsoft should have taken into account when developing the control)?
Thanks.
-Goalie35
|
|
|
|
|
Hi,
In my form I have 6 check boxes user selects those check boxes and clicks on button. On button click I have to insert those selected checkboxes into database table one row for each check box selection. Without business layer I am able to insert using StringBuilder appending each insert(checkbox selection) and exceuting all inserts with one database call. But I have business layer, I have to fill those business objects and insert values from business objects into database. How to do those multiple inserts with one database call when we are having business layer.
Thanks
|
|
|
|
|
Why do you have to have only one database call? Why can't you fill in and update several business objects from your button handler?
Are you using an ObjectDataSource? I don't recommend it for more complex table updates like this, but if so, you can handle the Inserting event, do whatever logic you need, and set e.Cancel = true so the ObjectDataSource won't actually do the insert (or update).
|
|
|
|
|
Hi, I need to send an email from my site and I'm using this code:
<br />
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)<br />
{<br />
CreateUserWizard wizard = (CreateUserWizard)sender;<br />
MembershipUser user = Membership.GetUser(wizard.UserName);<br />
<br />
if (user != null)<br />
{<br />
try<br />
{<br />
SmtpClient smtpClient = new SmtpClient("smtpServer");<br />
smtpClient.UseDefaultCredentials = true;<br />
smtpClient.Send("yourEmail", user.Email, "Account Conformation Email",<br />
"localhost/Confirm.aspx?id=" + user.ProviderUserKey.ToString());<br />
}<br />
catch (Exception ex)<br />
{<br />
Label1.Text = ex.Message;<br />
}<br />
}<br />
}
It gives me this kind of exception:
ex = {"The specified string is not in the form required for an e-mail address."}
Could somebody help me?
Thank you
|
|
|
|
|
"yourEmail" is not a valid email address. The first parameter should be the from address, not "yourEmail". I also wonder if your smtp server is really called "smtpServer".
|
|
|
|
|
Hi guys,
I need to build a Hierarchical Tree view structure (Manager > Employee relations)for my module which should be like
+ TopRootManager
- Manager 1
Employee1
Employee2
Employee3
- Manager 2
Employee1
Employee2
-Employee3
Employee1
Employee2
+ Manager 3
And Results should be from SQL database. Can any one help me plz !!!
From,
Menon
|
|
|
|
|
I have used the Telerik RAD Control TreeView to do this. Works very well.
http://telerik.com/products/aspnet/controls/treeview/overview.aspx
(I have no connection with Telerik other than as a happy customer)
|
|
|
|
|
Guys can any one help me out in Hierarchial Tree View for an organization.
from,
Menon
|
|
|
|
|
What else are you hoping for ? There's no tree control build into .NET, so a third party control is really your only option.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi
I have been trying for ages to fill a table with images which have been returned from a database
I removed my session that deals with log in status of the user, but when i removed it allowed all my images to be accessed and displayed in the table
When the user is logged in the session variable is set to yes and it will timeout within 30 mins of inactivity
can anyone tell me of a workaround so that i can still have this session and allow access to my images from this table?
my global.asax file has the following code
<%@ Application Language="VB" %><br />
<br />
<script runat="server"><br />
<br />
<br />
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)<br />
End Sub<br />
<br />
Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)<br />
End Sub<br />
<br />
<br />
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)<br />
End Sub<br />
<br />
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)<br />
Session("Loggedin") = ""<br />
Session.Timeout = 30<br />
CheckLoggedIn()<br />
End Sub<br />
<br />
Sub Application_OnPostRequestHandlerExecute()<br />
CheckLoggedIn()<br />
End Sub<br />
<br />
Sub CheckLoggedIn()<br />
If Session("LoggedIn") = "" And InStr(Request.RawUrl, "userLogin.aspx") = 0 Then<br />
Server.Transfer("relogin.aspx?ReturnUrl=adminhome.aspx")<br />
End If<br />
End Sub<br />
<br />
<br />
<br />
Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)<br />
<br />
End Sub<br />
<br />
</script>
|
|
|
|
|
Hi,
My project runs well on IE 6.0 but It doesnot appear correctly on other browsers including IE 7.0. What is the mistake?
with Regards
dev
-- modified at 12:09 Thursday 26th July, 2007
|
|
|
|
|
There could be any number of things wrong. Without seeing the actual generated html (and css) we're not going to be able to help you. Is your site publicly accessible anywhere?
One thing to check is to compare the source in different browsers. ASP.NET does some browser detection, and sends different html to different browsers. It's generally pretty good, and better in 2.0 than 1.1, but an example is panels. In 1.1, it will generate a single celled table to some browsers, and a div to others. You can override the behavior with a BrowserCaps setting in your web.config, but if you're using 2.0, you probably don't need to.
|
|
|
|
|
Hi
I have one problem Here
I have one site here and 2 users are there.
I want login 2 users of one site in server.
then we working with many different systems and access the data from the server with user ids.
if one user close the browser but session will not expire in server
every body access the data from 2 users with Queue System but once logining in server will not be expire.
How it is possible
if know any one plz give me a reply.
i have to implement this one.
thx Advance
ravi
|
|
|
|
|
I'm not exactly sure what you're asking, but there is no way the server will know a user has closed their browser, and hence know to expire the session.
|
|
|
|
|
Hi
Thx for ur reply
Is it possible to 2 users logged into server symaltaniously?
if it is possible , how to identify those user using our code.
thx
|
|
|
|
|
Session is unique for each browser/user.
Example:
Joe visits your website from his computer
Joe clicks on "Buy Coke"
Your website executes: Session("product") = "Coke"
Jane visits your website from her computer
Jane clicks on "Buy Pepsi"
Your website executes: Session("product") = "Pepsi"
There is no problem, Joe still has "Coke" in his Session, and Jane has "Pepsi" in hers.
If Joe closes his browser, and Jane immediately opens a browser on Joe's computer, then she might end up getting Coke.
Also, If Joe buys Coke using IE, and Pepsi using Firefox, there is no problem. There will be a separate session for each browser (IE or Firefox) coming from the same computer.
What is shared between all users is the Cache.
As for knowing who is executing your code, Page.User.Identity.Name will tell you the name used to log in.
|
|
|
|
|
Hi
Your Explanation is exactly right but our requirment is different.
actually my process is directly logging through the code only
in our office 40 member are there and site has 2 users accounts.
is it not possible to login 40 members into 2 user accounts.
that's why we are going to implement access the 40 members through 2 users
i want login users in server side, members pass the request and get the results but server side never logout if one memeber get the result over.
i think u can understand my process ,
then plz tell me how to handle 2 users acounts at server side.
thx
ravi
|
|
|
|
|
I'm still having trouble understanding you. I'm curious why you only have 2 user accounts. Is this your server, or are you trying to figure out how to let 40 users use 2 accounts on some other site? If that's the case, it really depends on how the other side is set up. It might have nothing to do with Session.
Perhaps if you clarify this sentence: "i want login users in server side, members pass the request and get the results but server side never logout if one memeber get the result over."
I'm not sure if you mean "the server side never logs out but I want it to" or "the server side logs out but I don't want it to".
|
|
|
|
|
Hi
thx for ur reply
exactly my meaning is " The server side never logs out."
i will give u another example
i have one web page which have 2 buttons.
when i click button open one user account and click second button open another user account.
how can i identify both users logged or not.
can u give me any idea about this
|
|
|
|
|
The cache is shared between all users...
Button 1: Cache("User1") = True
Button 2: Cache("User2") = True
on the server side you can determine if either or both have been clicked. However, you still have the problem that Cache times out, and how do you know if a browser is closed? You don't. The server has no way to know if a user has simply closed the browser.
I'm only tossing out suggestions. I'm sorry, but I still don't understand what you really want.
|
|
|
|