|
Hello friends i am amin i need help i want know how to create login with facebook into my web application.can any one help me how to step by step i am waiting
|
|
|
|
|
You give not much details about your platform and tools of development, but as you talk about web development, you should start here:
https://developers.facebook.com/docs/javascript/quickstart/v2.0[^]
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Hello Everyone,
I am uploading an image file using asp file upload control.
This is my code to upload the file in the folder.
public string UploadPicture()
{
if(fuImage.HasFile )
try
{
fuImage.SaveAs(Server.MapPath("~/assets/ImgNewsletter/") + fuImage.FileName );
string imagePath = "~/assets/ImgNewsletter/" + fuImage.FileName;
return imagePath;
}
catch (Exception ex)
{
return "";
}
return "";
}
and I have added this in my web.config
<httpRuntime executionTimeout="3600"
maxRequestLength="1048576"
useFullyQualifiedRedirectUrl="false"
minFreeThreads="8"
minLocalRequestFreeThreads="4"
appRequestQueueLimit="100"/>
My problem is that even after the files are uploaded, they are excluded from my ASP.Net project. Kindly let me know whats wrong with my code?
Many Thanks,
Regards
HumaMunir
|
|
|
|
|
HumaMunir wrote: excluded from my ASP.Net project What?! What are you talking about?! Are you seriously mean that some uploaded file will became part of your PROJECT?!
Do the files stored on disk? That's all you have done with your code...
Anyway to what project and for what purpose do you want to add uploaded files to your project?
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
The idea is that the admin will upload the newsletter, that will be shown to every user. This is not something exceptional, I have done this before using file upload. You can upload the files by giving a path and then can store the same path in the database to show them later. But this time all the uploaded files are invisible,in other words, are not included in my asp.net project's folder.
Regards
HumaMunir
|
|
|
|
|
HumaMunir wrote: his time all the uploaded files are invisible,in other words, are not included in my asp.net project's folder. You have a path string that shows where the files should be uploaded to. Are you sure that path is valid on the server? Have you checked other directories to see whether the files are stored elsewhere? Are you certain that the files are actually being uploaded?
|
|
|
|
|
|
HumaMunir wrote: but they are not included in the project. Of course they are not, they are just files stored in a folder, they have nothing to do with any project. A project is just a concept used by Visual Studio to group a set of files and rules for compiling and linking into an executable or interpretable program. If you want these files added to your project (and I have no idea why you would), then you need to copy them manually into your build system and rebuild and republish your entire project. You seem to be confused between the development and execution phases of an application.
|
|
|
|
|
Greetings.
I think I see what the issue is here. The Solution Explorer does not work like Windows Explorer -- it looks like Windows Explorer -- BUT....
It is only going to show you files that you put there using Visual Studio. Try right clicking on that folder and select Refresh Folder. If those uploads worked -- the files will show up after you refresh. You cannot expect Visual Studio to include a file in your project just because it is in a folder in your project -- you must explicitly do that -- either by adding them using the Solution Explorer -- or, by refreshing the folder after this upload process.
Also -- look at your try/catch again. You might just as well not use try/catch if you cannot tell that you threw an exception -- the catch block does nothing -- it returns in the same manner that the normal path does -- so all you have gained by using try/catch -- is that your function runs a little more slowly and .NET thinks that you handled the exception which makes it silent -- and likewise undetected.
EDIT: Having read through the entire thread -- let me say a few things -- that are my opinion from many years of experience -- not all of it was wise, either.
This is your project -- you do what makes sense to you -- but -- be very careful about assumptions that you make. I can see you possibly watching the process...looking at Solution Explorer -- and geting frustrated because your files are disappearing -- but, they are not disappearing -- they are simply not part of your project -- so they are not being displayed. That is why you are getting blowback from others about it -- they are not part of the project being built by Solution Explorer -- they are probably best described as input/output -- a product of the project, I suppose. So...I do not disagree with your folder structure -- it looks well thought out. However, you are making the assumption that Solution Explorer will list the content of the folder with no assistance from you -- and I learned that you must refresh that folder by making the same assumption -- so, I am telling you what I
learned so that you can have your question answered and move on to writing your code.
About the catch thing -- I also tend to litter my try/catch blocks and sometimes don't have much in the catch, but at a minimum I will put a breakpoint on a line of code in the catch, so that I still know that an exception occured. I am sure that you know -- if the permissions were not proper, and exception would have occurred -- access denied, I think -- right? Are you aware of what the Exception contains?
ex.Message = the Exception text and ex.StackTrace is the line where the exception occurred. I find that very useful -- I know many of the exceptions that occur in a file upload process -- because I sit on that catch block and wait for them -- and then I look at them. Another thing I want to share is this -- in the Windows SDK are the include files for many Windows DLLs -- The error codes are in those include files -- even a key to unraveling the HRESULT and other 32 bit returns that will tell you much more about exceptions and even successes. When I started taking the time to figure an exception out -- I spend much less time doing things that do not solve my problem and I learn how to write much more robust code that way. I was not born with that ability -- I got there by doing what I am recommending to you right now. I am sure you are a 'crackerjack programmer' (A compliment -- not an insult) -- and I would like to tell you some things to use as tools to make your code even better -- still your code -- just better.
I understand how you might feel offended -- you are just trying to get a 'fresh set of eyes' put on it to assist you -- that is what I am trying to do, here -- but...
I am a developer, too -- and I hope that your problem has been solved because we all run into this sort of thing from time to time and if we can help one another out instead of making further assumptions and ranting about things that are not the problem -- we all benefit from that.
I wish you well.
modified 17-Jul-14 6:15am.
|
|
|
|
|
What the connection between show an uploaded file to everyone and to make a part of the project!!!
You are talking nonsense here.
Upload the file, store it anywhere you want (and can), probably store a reference in your database, then present a link to the uploaded file to everyone should see it...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Kornfeld Eliyahu Peter wrote: What the connection between show an uploaded file to everyone and to make a part of the project!!!
You are talking nonsense here.
Upload the file, store it anywhere you want (and can), probably store a reference in your database, then present a link to the uploaded file to everyone should see it...
This is my criteria to store my file in my project. I am not talking non sense. May be you are overwhelmed with your so called knowledge. That’s ok if you can’t solve my problem but please learn to behave!
Regards
HumaMunir
|
|
|
|
|
HumaMunir wrote: This is my criteria to store my file in my project The funny thing that you are going with it again...Let put thing in order...
Project - is a unit (probably more than on in a solution) that used to write code. After publishing (with or without compilation) it transforms to an application (called also site sometime). So how it can be a criteria that an uploaded file will be part of the project!!!
No one can solve you a problem that by it's nature does not exist. Learn distinguish between project/application than you probably will solve your problem alone...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
HumaMunir wrote: catch (Exception ex)
{
return "";
} That's a very bad, really terrible, coding practice. Don't do so.
An exception occured. You just swallowed it. Perhaps the user had no priviledges to write to that folder.
Also note: how will you later be able to access those files? Do you have some database table or some other mechanism to find out which files exist and to generate the html links to them?
|
|
|
|
|
Bernhard Hiller wrote: That's a very bad, really terrible, coding practice. Don't do so.
Thank a lot for the advice but I have a check I am handling it on button click for now, will change it once I get the uploading fixed.
Bernhard Hiller wrote: Also note: how will you later be able to access those files? Do you have some database table or some other mechanism to find out which files exist and to generate the html links to them?
Following is my button click event, I hope this will help you understand the rest of the code and yes I am storing it in the database and displaying them on another page in a grid.
protected void btnAdd_Click(object sender, EventArgs e)
{
string isBest;
if (cbIsBest.Checked)
{
isBest = "Yes";
}
else
{
isBest = "No";
}
string picPath = UploadPicture();
string newsletterPath = UploadNewsletter();
if (picPath == "")
{
divError.InnerText = "Please select an image for the newsletter.";
}
if (newsletterPath == "")
{ divError.InnerText = "Please provide the e-copy of newsletter."; }
else {
try
{
string uploadedBy = Session["Email"].ToString();
if (dl.insertNewsletter(txtTitle.Text, ddlMonth.SelectedItem.ToString(), areaSummery.Text, picPath, newsletterPath, ddlCohort.SelectedItem.ToString(), isBest, uploadedBy)>0)
{
divSuccess.InnerText = "Thanks! Mahara Insight has been uploaded successfully.";
divSuccess.Visible = true;
}
else
{
divSuccess .InnerText = "Sorry for inconvenience. Some error has occured. Please try later.";
divSuccess.Visible = true;
}
}
catch (Exception ex)
{
divError.InnerText = "Sorry for inconvenience. Some error has occured. Please try later.";
}
}
}
Regards
HumaMunir
|
|
|
|
|
We've a project with 150+ forms and 70+ reports / graphs and got scheduled to complete in 2014 Dec by starting the development now. We have enough knowledge in project and specification also is ready. But my hands are empty in development which supposed to start this month end.
We want to deliver a good and rich customer experienced web application. UI interface should be smooth and the performance to be good. This will be a intranet application. We've chosen to did it in ASP.NET (Visual studio 2012) with back end MS SQL Server 2008 R2.
My worry is designing the base template itself will consume much time if each and every thing will be developed from ground level. I searched and come up with availability of third party templates. (http://themeforest.net/category/site-templates/admin-templates)
When I saw the demo which they provided in their site, it looks good for me and it is enough for my application.
Please share your ideas and experiences with third party templates.
- Will it suitable for projects which fresh start?
- Will it help us to reduce the development efforts in page / form design ?
- Can we incorporate it in .net development environment?
Please share your valuable suggestions if any other way of solution.
Thank you.
Rishihar Subashchandran
|
|
|
|
|
An application of that volume it should be very wise to bring in a web designer - that can help you to create a higher level of look and feel...However if there is a time frame that renders the work of a designer invalid, you may consider a good template too, but you have to see whether the template will not break you, so take you most complicated pages (in look, not in code) and test it against the template. If you have your template, than bring in a designer anyway to fir it for you, than drop him...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
|
If you look at other large scale efforts that are intended to be used in a variety of situations you will find a common 'template' already -- XML.
SQL Report Definition Language = XML
Microsoft XPS = XML
SOAP = XML
ADO.NET DataSets and DataTables both can serialize as XML and XML Schema.
XML is the world's best glue because it is self-describing and completely system, network and transport agnostic. It can carry any type, the objects created from it are automatically native and correct and its support is widespread -- XSLT can output just about any object you care to -- HTML, XML, JSON, etc.
If you begin with XML -- you can always replace it easily with something more specific -- but if you start with something specific and your design is not frozen -- you will struggle to complete it at all, much less on time.
|
|
|
|
|
I want to have an inline editing in a gridview in asp.net mvc web application
|
|
|
|
|
how to integrate geo-fencing on my website using php code?
|
|
|
|
|
Where are you stuck? We need a lot more information.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Maybe it is enough to use a simple code as being used for example on this quite neat site which is not a Finnish based domain ( .fi domains are ) but it still does well with big G. This site is using
meta http-equiv="content-language" content="fi"
to describe the site is in language "finnish".... ? I dont know but I am seeking answet to this GEO question also. Or maybe the site has so many visitors that search engines likes it....just an example....
|
|
|
|
|
The site you've linked to is a Finnish credit-comparison site. This sort of link looks suspicious, as it's the type of site usually associated with spam messages.
Although your message appears to be genuine, I'm afraid the presence of that link is probably enough to get it removed. The spammers seem to have been getting craftier recently, hiding links in otherwise normal messages, and a lot of us have itchy trigger-fingers on the "report" button.
You might also find that your account gets removed. Your other message also mentions a spam-like domain, and you haven't set a display name in your profile, which is the sort of behaviour usually exhibited by the spammers who frequently bombard this site.
If this happens, please don't take it personally. You'll be able to sign up again, and so long as you remember not to post links to random websites - at least not before you've established yourself as a genuine user! - you can look forward to a long and happy membership.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
How does one account for a single transaction across logs when there is no common fields (foreign key fields if you will)?
* Multiple hits at the same time on Apache web server.
* Apache routes access to Tomcat which is acting as an application server
* Tomcat builds response but needs to access CGI on Apache via non 80 port which spawns a SAS/SUDAAN process (think SQL)
* CGI responds through Apache back to Tomcat which completes response page then routes it back to Apache (80) which sends it back to client web browser.
When doing log analysis how does one tie these individual events into a tidy transaction using Tomcat and Apache logs? Stated differently; when doing pretty reports, how can one link these transactions together? As stated before multiple accesses are occurring within the granularity of the time-stamp; Tomcat and Apache are recording the time-stamp but it is not very useful.
Thanks so much,
EB Bligh
|
|
|
|
|
I wrote this HTML for a header:
<header>
@ViewBag.Title
</header>
but the problem is that the text is not centered correctly, it's centered on the space of the header after the image, any suggestions to get it right to the center?
|
|
|
|