|
Helllo everyBody,
Just wanna to say that clients can access any web Page or any website and try to download that file.and then the isp should detect this file and stop it.
best regards
dghdfghdfghdfghdgh
|
|
|
|
|
Eh? Do you mean that you don't want anybody to be able to rip your website? If so, there's no simple way to stop this (and in some cases it's impossible).
|
|
|
|
|
hey plz Mr. O'Hanlon i need ur help.
We have some files that exist in some sites that help some clients to activate my application.
i thaught that if i speak with the isp provider to prevent this persons from downloading this files, it seems a solution to my problem.
Note that i don't have any website.
Some one tell me to use a proxy server and disallow these files from being downloaded.
do you have any suggestion plz?
best regards
dghdfghdfghdfghdgh
|
|
|
|
|
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 21: static MemberPhotoConfiguration()
Line 22: {
Line 23: dbConnectionString = ConfigurationManager.ConnectionStrings["MemberPhotoConnection"].ConnectionString;
Line 24: dbProviderName = ConfigurationManager.ConnectionStrings["MemberPhotoConnection"].ProviderName;
Line 25: productsPerPage = Int32.Parse(ConfigurationManager.AppSettings["ProductsPerPage"]);
Source File: c:\Inetpub\wwwroot\MemberPhoto\App_Code\MemberPhotoConfiguration.cs Line: 23
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
MemberPhotoConfiguration..cctor() in c:\Inetpub\wwwroot\MemberPhoto\App_Code\MemberPhotoConfiguration.cs:23
[TypeInitializationException: The type initializer for 'MemberPhotoConfiguration' threw an exception.]
MemberPhotoConfiguration.get_DbProviderName() in c:\Inetpub\wwwroot\MemberPhoto\App_Code\MemberPhotoConfiguration.cs:45
GenericDataAccess.CreateCommand() in c:\Inetpub\wwwroot\MemberPhoto\App_Code\GenericDataAccess.cs:111
CatalogAccess.GetDepartments() in c:\Inetpub\wwwroot\MemberPhoto\App_Code\CatalogAccess.cs:54
DepartmentsList.Page_Load(Object sender, EventArgs e) in c:\Inetpub\wwwroot\MemberPhoto\UserControls\DepartmentsList.ascx.cs:22
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Control.LoadRecursive() +131
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061
|
|
|
|
|
wsamuel,
Take a read of the guidelines:
http://www.codeproject.com/script/Forums/View.aspx?fid=1649&select=1278604#xx1278604xx[^]
Shouting "Urgent!!Please Help!!" and not making your subject title useful wont get you help.
If you read what the error said, you'd know what it means, something on line 23 is null.
Line 23: dbConnectionString = ConfigurationManager.ConnectionStrings["MemberPhotoConnection"].ConnectionString;
So, check you have created dbConnectionString and that "MemberPhotoConnection" is in the webconfig file.
Regards,
Gareth.
|
|
|
|
|
I'm so sorry. I'm new to here. Thanks for the remind and the help.
|
|
|
|
|
Hi,
I'm trying to run a batch file from my C# windows application.
this is my batch file:
@ECHO OFF
ECHO "GOOD MORNING %1%"
:ASK
SET /P ANSWER="Do you want to continue (y/n) ? "
IF "%ANSWER%" == "y" GOTO PRESS_YES
IF "%ANSWER%" == "Y" GOTO PRESS_YES
IF "%ANSWER%" == "n" GOTO PRESS_NO
IF "%ANSWER%" == "N" GOTO PRESS_NO
GOTO ASK
:PRESS_YES
notepad
:PRESS_NO
exit 1
and this is my c# code:
Process pepprocess = new Process();
pepprocess.StartInfo.FileName = "cmd.exe";
pepprocess.StartInfo.Arguments = "/c helloworld.bat GIDI";
pepprocess.StartInfo.UseShellExecute = false;
pepprocess.StartInfo.RedirectStandardInput = true;
pepprocess.StartInfo.RedirectStandardOutput = true;
pepprocess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
pepprocess.StartInfo.CreateNoWindow = true;
pepprocess.Start();
StreamWriter sw = pepprocess.StandardInput;
StreamReader rd = pepprocess.StandardOutput;
while (!rd.EndOfStream)
{
string line = rd.ReadLine();
richTextBox1.Text = line;
if (line.Contains("?"))
{
sw.WriteLine("y");
}
}
my problem is that when i get to the question line, the process is stuck.
the purpose of my c# program is to show the output of the batch file in a windows form, and get answers from the user and send it back to the batch file.
can anyone help me?
thanks,
Gidi.
|
|
|
|
|
Member 2122963,
I don't have an answer for you, but why are you using batch to just start notepad?, why not just it all in C# ?
Regards,
Gareth.
|
|
|
|
|
Hi
looking at the code, i don't think the problem is the detection of the question or the writeline of "y". to me, it looks like the problem is here:
while (!rd.EndOfStream)
{
change it to
while (!pepprocess.HasExited)
{
if it doesn't help go step by step through the code and look what happens..
greets
m@u
|
|
|
|
|
hi all
i have resolved the problem.here is the code
aspx page
<html xmlns="http://www.w3.org/1999/xhtml" ><br />
<head runat="server"><br />
<title>Untitled Page</title><br />
<script type="text/javascript"><br />
<br />
function SelectAll(id) {<br />
var frm = document.forms[0];<br />
for (i=0;i<frm.elements.length;i++) {<br />
if (frm.elements[i].type == "checkbox") {<br />
frm.elements[i].checked = document.getElementById(id).checked;<br />
}<br />
}<br />
} <br />
</script><br />
</head><br />
<body><br />
<form id="form1" runat="server"><br />
<div><br />
<asp:GridView ID="GridView1" runat="server" Width="400px" AutoGenerateColumns="False" OnRowDataBound="GridView1_RowDataBound"><br />
<Columns><br />
<asp:BoundField DataField="PersonID" HeaderText="PersonID" InsertVisible="False"<br />
ReadOnly="True" /><br />
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" /><br />
<asp:TemplateField><br />
<%--<AlternatingItemTemplate><br />
<asp:CheckBox ID="CheckBox1" runat="server" /><br />
</AlternatingItemTemplate>--%><br />
<ItemTemplate><br />
<asp:CheckBox ID="CheckBox1" runat="server" /><br />
</ItemTemplate><br />
<HeaderTemplate><br />
<asp:CheckBox ID="cbSelectAll" runat="server" Text="Select All" /><br />
</HeaderTemplate><br />
<HeaderStyle HorizontalAlign="Left" /><br />
<ItemStyle HorizontalAlign="Left" /><br />
</asp:TemplateField><br />
</Columns><br />
</asp:GridView><br />
</div><br />
</form><br />
</body><br />
</html>
code behind
protected void Page_Load(object sender, EventArgs e)
{
BindGrid();
}
private void BindGrid()
{
string Connstr = "connection string";
SqlConnection Conn = new SqlConnection(Connstr);
string str = "select * from emp";
SqlCommand cmd = new SqlCommand(str, Conn);
Conn.Open();
DataSet ds = new DataSet();
SqlDataAdapter Adap = new SqlDataAdapter();
Adap.SelectCommand = cmd;
Adap.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{
//adding an attribute for onclick event on the check box in the header
//and passing the ClientID of the Select All checkbox
((CheckBox)e.Row.FindControl("cbSelectAll")).Attributes.Add("onclick", "javascript:SelectAll('" + ((CheckBox)e.Row.FindControl("cbSelectAll")).ClientID + "')");
}
}
pintoo
|
|
|
|
|
Hi Chithra,
What is the problem? Please explain the problem.
|
|
|
|
|
have a look into my last post(posted 24th march).it is in the 5th page of c# message board.
pintoo
|
|
|
|
|
what is the question
|
|
|
|
|
I've two tables and while insertion I've to face lazy response. The query takes much time to insert record. Any suggestion is welcomed. I'm usiing SQL Server 2000.
Thanks
Syed Shahid Hussain
|
|
|
|
|
Syed Shahid Hussain,
What are you asking for? Ways to speed up the insert?
Well, you'll need to give us some code to see what you currently do, and how many rows are you inserting?, also, have a google for Bulk Copy (BCP) or read http://www.codeproject.com/KB/database/SqlBulkCopy.aspx[^]
|
|
|
|
|
one way you can speed up insertion is using stored prcedure which is precompiled code.
try to use store proc plz
Abdul Rahaman Hamidy
Senior Student Student in Computer Science
Kabul, Afghanistan
Software Developer
|
|
|
|
|
Hi syed,
You can check
1. whether over indexing is used in the table.
2. use stored procedure.
3. whether u r inserting multiple records at a time?
4. please give complete picture of your work.
Sarvesh Upadhyay
Senior Software Engineer
Birlasoft India Ltd.
Microsoft Certified Professional Developer in Dotnet 2.0 Enterprise Application
|
|
|
|
|
My Dears I am new in using MyNeoReport as reporting for .Net applications.
I would really appreciate if i could have some reference for using MyNeoReport.
you are the most welcome to assist me plz.
Abdul Rahaman Hamidy
Senior Student Student in Computer Science
Kabul, Afghanistan
Software Developer
|
|
|
|
|
I doubt anyone here has heard of it, does it not offer any support ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
There is a tutorial for this here[^] on Code Project.
|
|
|
|
|
hi
I am doing a project in which i have two forms
frmMain and frmTest
in the frmTest i am having a rich textbox and a static string declared;
so from the frmMain i am setting the string value to some text; and then i am creating a object of that form and showing it
This was running perfect till yesterday
today i have a peculiar problem
its giving a exception
"
SEH Exception was unhandled
External Component has thrown an exception " Please tell me how to solve this
THANK YOU
*** Why EXPERTS behave like a fool ***
|
|
|
|
|
Firstly, there are better ways of passing data from one form to another than using public static members (think constructor arguments or properties). Secondly, please post what exception you are seeing and maybe a stack trace.
--
gleat
http://blogorama.nerdworks.in[ ^]
-- Once we figured out that taking our shoes and socks off would double our counting ability the technical glitch was quickly rectified. -- Chris Maunder, from the CP newsletter
|
|
|
|
|
What you're doing is nasty as all hell. There's an excellent article on cP on how to share data between forms. The short version - use delegates.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
if i say
Enter your full name :Peter Alian Smith
So this name has to be start from char no space from starting name.
once user write his first name only one space allow not more then one space.
again user write his middle name and only one space allow not more then one space...
So is that anyone can help me.what should i use ?
-Thanks
Peter
|
|
|
|
|
Why do you need it to be so strict ?
The Trim method removes leading and trailing spaces. A regex or a split and then rejoining with only one space would fix the rest.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|