Project in Yii2 cloned does not work for me locally - yii

I've never worked with Yii, only with Laravel, java, .Net and c#. The thing is that they gave me a project to make some modifications but I can't make it run locally in windows.
I configured the paths in Xampp, I tried to occupy php yii serve but it throws me an error with the web folder that does not exist nor I know that it calls in that folder.
Someone who could guide me to make it work for me, please.
These are all the folders that were installed when I cloned the project, I executed the composer was updated and installed the dependencies

Related

Vue Project not working after ubuntu customization

I have created a project using vue.js at the frontend and flask at the backend, It was working perfectly. But, after I customized my ubuntu OS, suddenly I am unable to run the project, my flask and every other framework and library was uninstalled and I am unable to reinstall vue and I get this error message when I try to install vue again:
Can someone tell me how to resolve this issue?
By Customization, I installed some extensions and then some wallpapers, icon packs etc..
As a user has mentioned in the replies earlier, what you are trying to do is installing a global package, and the error displayed there clearly stated that you lacked permissions, and the customizations you mentioned should not have any impact on this.
Since you are using Ubuntu, just add a sudo in front of the command that you are trying to execute and it should be fixed.

Whys is IISExpress giving 404, when server IIS works

I am using Visual Studio 2017 version 15.8.7 on windows 10.
This issue is happening for Asp.net MVC 4 websites and Web Api 2. Not for Aspnet.Core sites (so far)
Lately I have been having issues where I will be debugging a website and it will work fine then all of a sudden the next time you start the project up, it gives a 404 error. The only way to fix the error is to use a different computer, create a new project and copy the info over.
Every time I start the debugger and get 404, this event is recorded.
The directory specified for caching compressed content
C:\inetpub\temp\IIS Temporary Compressed Files\Clr4IntegratedAppPool
is invalid. Static compression is being disabled.
Things I have tried.
Uninstal VS / IISExpress and reinstall, including delete all folders in program files
Create a new project and copy code over. (works, but then happens again later on)
Use different computer. (works, but eventually that computer hits the issue too)
Tried creating the temporary folder and giving "Everyone" full control of it.
Tried changing port number and re-creating virtual directory
Tried deleting entire solution folder and re-cloning repo.
The issue does not happen on the web servers, only locally.
Any idea on what is going on? I can't find any configuration that is telling IIS to compress the files, so not sure why I keep seeing that error.
Edit
I determined that the application_start even in global.asax is never firing (StreamWriter code in it to log to a file in case debugger issue). So I assume the 404 is because the routes never get registered.
I tried updating Microsoft.AspNet.Mvc to the latest 5.2.6.
Edit 2
So I found a workaround. I installed IIS locally and publish to a folder and debug by attaching to the process. If I point IIS directly at the project or use IIS within VS it doesnt work.
I think the issue is related to some dll goofiness, project seems to work once published.
Edit 3
Found the root of the problem. I use Ubuntu/bash on windows. Cloning the git repo through bash seems to be setting the permissions wrong. If I clone through command line, the issue does not happen. Now I need to figure out why bash is screwing up the file permissions.
Same issue with VS2017 on Windows 10, default IIS Express and git for Windows. Suddenly iisexpress returns 404 on /Default.aspx!!??
Solution:
Close VS2017
Delete the git repository in the file system.
Open VS2017
Clone the git repo
this helped on my machine.

Toolbar missing when running ASP.NET core from Visual Studio Code

Environment: Ubuntu 16.04, .NET Core 1.10 (1.0.0-preview2-1-003177), Visual Studio Code 1.8.1
I just generated a new ASP.NET Core app. When I run the app from a terminal window, the start up web page gets displayed as expected.
$ cd MyApp
$ dotnet run
However, the web page is slightly different when I load MyApp folder from VSC and press F5 to debug it. Specifically, the default top toolbar is missing. Toolbar items such as Home, About, Contact, etc. line up in a single column.
I have compared the generated html between the two. When run from the command line, the stylesheet links are:
href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.6/css/bootstrap.min.css"
href="/css/site.min.css"
When run from VCS, the links are:
href="/lib/bootstrap/dist/css/bootstrap.css"
href="/css/site.css"
On examining local file structure, I see file css/site.css is present under folder wwwroot. However, I don't see any lib folder at all.
More information. Turns out _Layout.cshtml adds links based on environment names. When the names are Staging and Production, the generated bootstrap link is for ajax.aspnetcdn.com. For "Development," the link is "/lib/xxx."
Wondering how I force VCS to automatically populate bootstrap.css into lib directory.
Problem solved. When the website is generated, a file, bower.json, is created. This file has information about the bootstrap package. However, for some reason, this package is not automatically downloaded. You need to do the following:
From VSC, install the bower plugin by running "ext install bower."
Press F1 and type Bower. Next type, "Bower Update."
This is it. The plugin will download the bootstrap package and populate it in wwwroot/lib directory. Now, the website would work as expected from within VSC.
Hope the next version of VSC will have bower integrated.
It seems like when your app runs from VS Code, it is not serving the CSS files.
To troubleshoot further, looking at the launch.json, project.json, and Startup.cs files is necessary. My guess is that your launch.json is setup to run under a slightly different configuration than your dotnet run command is from the terminal. That is resulting in...
not serving static files at all, or
not including CSS files in the app's build output.
From your question update, the problem is that your launch.json is running under in the Development environment and your terminal is running under the Staging or Production environment. The former serves bootstrap locally; the latter serves it from a content delivery network.
When running in the "Development" environment, you need to install bootstrap locally and ensure it's in the /lib directory at runtime. That means installing the client-side packages. How to do that depends on the ASP.NET Core application template your using. For instance, if you generated your app with Yeoman, then you need to restore with Bower. Check for a gulpfile.js, a bower.json file, or a package.json that downloads, installs, and builds client-side dependencies, which likely include bootstrap.

Web API Help page not showing XML

I have a Web API project in which I removed by hand Areas folder few months ago when we started development. Now after everything is finished I want to add API help pages but it is not working as expected.
I installed nuget package for help pages.
I uncommented line in HelpPageConfig.cs
I checked Generate documentation file (to App_Data folder)
When I open http://localhost:51665/help I get this: (No methods are shown)
Any idea what could be wrong? If I start new project from scratch everything works properly.
I suppose you've setup your project in two steps:
You should choose Build tab in API project Properties and set up XML Documentation file in Output section. For example: App_Data\XmlDocument.xml
Then you can updateHelpPageConfig.cs in method Register... in my case
config.SetDocumentationProvider(new XmlDocumentationProvider(HttpContext.Current.Server.MapPath("~/App_Data/XmlDocument.xml")));
When your project is in compilation process, take a look in output window, whether documentation is really generated.
Try to use older version of ASP.NET Help pages (version 5.2.2 works for me).
Install-Package Microsoft.AspNet.WebApi.HelpPage -Version 5.2.2

Easier way to test an existing DNN module?

Each time I want to test the DotNetNuke module I'm working on, I uninstall it from the DNN website host control panel, I zip my module dev folder, and then I reinstall it from the DNN website.
Is there any faster way to test my module?
Are you testing the install process?
If not - all the changes in DesktopModules/YourModule or App_Code/YourModule will take effect immediately and will be ready for testing (assuming you're using a Website project, and your virtual directory is pointing to your dev. directory)
If you're using the Web Application project - make changes, build, move the files to the virtual directory target folder, then test.
Let me know if this helps.