|
Hi All,
Im created web application using .net 2008, and its hosted and working fine, now i created a another console application to my same solution as new project, i did some stuff there,added the reference from backend classes, its also woring fine.
My requirement is set that console application to SQL job, so i did that by setting my local solution path
(ex- E :\Test\WebApp\Console\Test.exe). its working fine too.
My problem is when i host this console application with web project, how can set the reference to console application?.
I created sub folder for console application inside my web project in hosting server, then added the console exe and app.config file, but that time my sql job is not working , should i add bin folder there?
what is the path should i follow?
Pls give some ideas?
Thanks
|
|
|
|
|
Think about it. With a web project, all of the code is executed a web server in a room somewhere in the world. A console app would execute on that same machine, if it were even allowed. Who would see the app?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
i used that console app for some sort of mail sending mechanism, as i said i have set that console for SQL job already its wroking, what i really need to know is how can host that console in the same project?
|
|
|
|
|
indSoftware wrote: how can host that console in the same project
You can't, shouldn't, and it makes no sense to even try doing so. See my previous explanation.
If you simple want to execute code you don't need a console app to do so. Create a library and call class/method as necessary.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
ok thx for your reply, if i create a class library how can set that it to SQL job for daily scheduling.
Thanks.
|
|
|
|
|
The same way did in the console app. Seriously, you need stop and learn a bit more about the differences between console app, web apps and class libraries.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Dear friends,
I am working on ASP.NET 3.5 with C# Web Application. I want to upload some data to Sql Server Database. I am fetching some existing data from sql server database and want to display user like already these many records available in database. Do u still want to upload? If user clicks on yes it should display some other controls to upload data. If No, some other action to be taken. Please tell me how to prompt the user to do the above task. Please help me.
Thanks,
Dileep.
|
|
|
|
|
|
After implementing a CSS template to my web site i am getting the following error while running. "Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. "
I searched a lot in net and found some solutions which did not worked for me. But my actual problem is the same code is working in another browser. I am getting the error while i am using IE. What is the reason and solution???
|
|
|
|
|
Hi,
I am implementing error handling in my website developed in ASP.Net MVC & C#. To do this, I have set CustomErrors attribute in my web.config file as below
customErrors mode="On" defaultRedirect="Error.aspx"
This should ideally redirect user to default error page which is present in Views/Shared/Error.aspx.
This bebavior was working perfetly untill I changed the base class of my controller classes. Earlier, the base class was "Controller" but for some internal logic, I changed it to ControllerBase and my ControllerBase is now inherited from Controller class.
For example
HomeController : ControllerBase
{
...
...
}
ControllerBase : Controller
{
...
...
}
But now when I run the application and some unhandled error occurs, the user is not redirected to Error.aspx any more. Instead it gives error page as below. Even if I set custom errors mode to "On".
----------------------------------------------------------------------
<configuration>
<system.web>
<customerrors mode="RemoteOnly">
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customerrors> configuration tag to point to a custom error page URL.
<configuration>
<system.web>
<customerrors mode="On" defaultredirect="mycustompage.htm">
----------------------------------------------------------------------
Any help will be appreciated...
Thanks
Anil
|
|
|
|
|
Hi,
In my Web application, I have the following block of code :
app.Context.Response.StatusCode = 301;
app.Context.Response.Status = "301 Moved Permanently";
app.Context.Response.Redirect(urlRouteResult.RoutedUrl);
Recently, I read an article and found that, Response.Redirect issue the Http Status code 301, so is it redundant to use the code app.Context.Response.StatusCode = 301; when I am using app.Context.Response.Redirect(urlRouteResult.RoutedUrl); ?
|
|
|
|
|
Response.Redirect actually sends code 302 not 301. See MSDN [^]
|
|
|
|
|
Thanks,
So, if I want to send 301 code, is the following code my only option ?
app.Context.Response.StatusCode = 301;
app.Context.Response.Status = "301 Moved Permanently";
app.Context.Response.AddHeader("Location", urlRouteResult.RoutedUrl);
|
|
|
|
|
If you are using 4.0 there is already a method for this, RedirectPermanent[^]
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
i m working on custom ajaxEditor Control
i have override FillTopToolbar() method of editor class and added some buttons.
now i want to add InsertImageButton to toolbar fro that i have written
TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.ImageButton());
but i m getting following error-
Cannot create an instance of the abstract class or interface 'AjaxControlToolkit.HTMLEditor.ToolbarButton.ImageButton'
so plz tell me how can i add this button to toolbar..
thanking u
|
|
|
|
|
this the same problem to me any solve????
|
|
|
|
|
Hi,
I want to add tablerows and columns on every button click in asp.net(C#.net) for existing table, after that i want to save all these rows data in the database. please help me out How to create table rows and columns dynamically and save in the database. Client will not allow the javascript in the pages.
Thanks in advance, and help me out.
-Murty
|
|
|
|
|
let say you have table name 'tblData'.
Now if you want to add table row then create table row by
TableRow tr = new TableRow();
Create table cell and add it to table row
TableCell tbcell = new TableCell();
tr.Controls.Add(tbcell);
Then add it to your table
tblData.Controls.Add(tr);
|
|
|
|
|
Thanks also from me!
I was wondering about that the other day, but then got distracted.
You have reminded me and solved it in one go
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
|
|
|
|
|
Thanks Dalek Dave
|
|
|
|
|
below code is default.aspx
but default.aspx was called so many time.
jungJava() function is called always and don't stop.
i don't know why....
////////////////////////////////////////////////////////////////////////////////
<script type="text/javascript">
function jungJava()
{
debugger;
alert("called");
document.getElementById("txtTest").value = "11000";
count++;
form1.submit();
}//function jungJava()
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input type="hidden" id="txtTest" name="txtTest" value = "1" />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
<script type="text/javascript"> jungJava(); </script>
</html>
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
Of course it is, you're telling it to.
<script type="text/javascript"> jungJava(); </script>
This is going to run every time the page loads. Then your script submits the form which causes it to reload, which causes the script run, which submits the form, which cause to reload, which causes...see how it goes?
If you want to happen once then trigger it with an event, such a button click.
Also, notice how the code snippet here is formatted? Use it next time
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi folks
I'm building this registration system in my asp application and I've got a question. I'd be happy if you provide me with an answer.
I have a code block to check if the entered email exists or not. I've used executeScalar method here. so when the email exists I receive a ONE. now I made an if block telling the machine to print an error then and stop the process. because I'm putting the main process (saving user to DB) after this checkpoint, HOW can I stop the code blocking from process(going on to insertation) if email exists before?
I mean I want the transaction to stop if email exists and this requires I think something like break; or ... . can you help me?
Proper Prepration Prevents Poor Performance! h
|
|
|
|
|
I think this validation is better to do on DB.
But, instead
break use
return
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
modified on Sunday, May 23, 2010 6:05 PM
|
|
|
|
|
Hello I'm Developing an Online Examination System using ASP.NET
- I just want to know the best way to store the students answer in the database
is it better to store the Id of the Selected option or the value of it
and What I have to store when the answer of question is text ?
- how to display the quesitons depending on their type for example :
Multichoice with one answer [Radio list box]
Multichoice with many answer [check list box]
regards ,
You have To Search About The Truth Of Your Life
Why Are you Here In Life ?
|
|
|
|