SQL Network Interfaces, error: 50 - c#

I just published my ASP.NET Website on IIS and have already configured it to be working, everything is running smoothly.
Except.. I can't accept the App_Data file where all my database information is stored. That might not be the only folder that i can't access but maybe possibly App_Code too? Where i place all my Data Access Object classes (CRUD).
I searched high and low on blogs, articles and stackoverflow but i still can't find the solution to accessing the folders.
I also read that by default certain file extensions are being blocked by IIS.
Is there a possible way to solve this?
Web.config
Error
I read that changing (LocalDB)\MSSQLLocalDB to something else might work?
I'm not sure exactly..
Appreciate any help please.. I'm relatively new to IIS and this is my first published website running on localhost.

Related

Windows service not able to hit network drive path asp.net

I have one windows service which used to place files on network drive. It is working fine on some machines but on some machines it is not working fine. Although when i am trying to do with Window application it is working fine.
Please suggest me how i can solve this issue. As there are more than 100 of systems where this service installed but I am getting this issue random basis.
Thanks all for your valuable comments.
I found one more thing and this is definitely missing from Networking team. They had provided the access only on child folder not on the root folder that's why service was not able to hit mapped directory.
After provide the full permission to root directory, service is able to place files.
All possible scenarios which provided in comments will also be helpful for me to solve issues related with same domain.

ASP.NET website deploys but only I can see

I have a prototype .net web site that is on Windows 10, created using C#. I am using IIS on the same machine to deploy from Visual Studio 2017. It uses SQL Server for back-end data. The site only runs on intranet.
It deploys ok, I can see all the pages, from all three of my machines. But others cannot see anything. They get a run-time error, that does not say anything specific.
My machine was re-imaged and hence the need to redo this.
I looked at IIS log and it does not have any info. What else I can look into?
In web.config, turn off custom error mode to see detailed error message on the client:
How to set web.config file to show full error message
If it works locally and not remotely, it's likely a permissions error (accessing a resource that the client doesn't have access to), or maybe a pathing issue (you are referring somewhere to something by disk or UNC instead of URL, or to a domain that only makes sense to you, like localhost).

Website not working after migration from one EC2 server to another

I'm wondering if any of you can shed some light on a problem I'm having.
I had a website located on an Amazon EC2 instance, it was working with no problems however the person who set it up located it the wrong region. As a result I've set up a new EC2 instance and zipped up the website directory.
I copied it across to the new instance and unzipped it.
Then I set up the website in IIS, it has it's own username so it doesn't run under IUSR. This use has full permissions to run the website and other than location, the setup is identical to that on the previous server.
However, when I go to adjust the connection string through IIS I get a message:
There was an error while performing this operation.
Details
Filename: \?{path to web config here}
Error:
I've not seen anything like this. I can open the web config in notepad++ and make changes with no issue. But the site reports the web config as malformed. Even using the exact web config from the working server this same message appears.
I've tried re-compacting the site on the working server and transferring again with exactly the same results.
Anyone got some advice on what I could try?
I'd be willing to bet that an extra module that you had installed on the old instance is not available on the new instance; I had a similar problem when I was using ther url-rewrite module of IIS on one instance, and moved the site to another instance that did not have that module installed and got a very similar (if not identical) error message - that would explain why the config was valid on one server, but not on the other.
You need to make sure all of the 'extra' options that were turned on in the old instance are available on the new instance, and I'd start by checking the rewrite module.

CS0103: The name 'xxxx' does not exist. This randomly occurs

I have researched this quite a bit and while I can find a number of articles on the general issue and the code, unfortunately none quite like what we have.
Environment: We have 2 web servers running Windows 2012 and IIS 8. All running .net 2-4.5
Web Server 1: This is our main server that runs our main websites and web applications
Web Server 2: This runs our client websites
Code: Both sets of code are uncompiled. Both the shared code and the client websites are .NET 4 sites.
Scenario
On Web1 we have a set of website code that is shared amongst a number of client websites. On Web2 the client site is set up in IIS and a sub directory of the App_code is a virtual directory pointing to a folder in the shared code on web1. We also have another virtual folder that points to the Web1 code as well. We have over 100 websites running in this fashion for over a couple of months.
Recently a couple of our clients have contacted us to say that they are receiving an error when browsing to parts of their website that are served by these virtual directories. The file that it references in the error message is in a modules folder in the virtual directory. it is a .cs file.
It only seems to be one website at a time and if we make a change that forces IIS to 'recompile' the site (meaning that we make a slight change to the web.config, save it and then change it back and save again), the error disappears and the web site starts working correctly. When we check other sites that are in the exact same setup as the one failing, we do not get any errors and they work correctly.
We are whits end as the issue seems to be completely random. This issue has only started occurring in the last week or at least this is the first we have seen of it.
We are at the point where we believe that it might be an IIS 8 issue and something that might be occurring when it is trying to recompile a client web site but due to the randomness and the 'easy fix' it is difficult to troubleshoot or even know where to go looking for the issue.
Any help would be much appreciated.
Thanks
Don
What is the error you're having? Based on what you said, the behavior is random and points on a C# file, not much can be said and only guesses could be make...

Move a Web Site project with a web service to AWS windows server

I've started ut a new instance of a windows server 2008 and am trying to move and launch my web service I've created in Visual Studio. How do I move the project from my local computer to the remote desktop? Grateful for all help!
I've tried the really simple approach and just copied the directory to the remote desktop in the same location as on my local computer. Did not work.. When I try to access the same adress that it has on my local computer (http://localhost:80/somesite all I get is this:
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
I'm probably going about this the wrong way, but don't know where to start..
Sounds like you need to setup IIS. See the following link http://www.codeproject.com/Articles/28693/Deploying-ASP-NET-Websites-on-IIS-7-0
I would make sure asp.net is enabled in the IIS server. Also try to explicitly hit your page such as:
http://localhost:80/somesite/myhome.aspx
I'm sure there is a quick answer to your particular issue, but if you're going to be doing this sort of thing often, it is best to take some time up front and read up, then click around and get a feel for IIS.
http://msdn.microsoft.com/en-us/library/ms178477.aspx
Visual Studio has abstracted much of the site/virtual directory setup and configuration, chances are you can't just copy the files over and have it work. There are lots of things to think about: websites versus virtual directories and their configurations, application pools and their identities, file permissions, default documents, etc. enjoy.

Categories